I had this issue and I wanted to write somewhere the solution to it.
In Firefox
Preferences->Network settings and Enable DNS over HTTPS.
The hint was: https://www.linuxquestions.org/questions/linux-newbie-8/can't-access-https-sites-in-firefox-fresh-ubuntu-6-10-install-506164/
In Chromium I can't figure out how to enable DoH.
EDIT:
When running Chromium under a supported desktop environment, the system proxy settings will be used. However, either your system is not supported or there was a problem launching your system configuration.
But you can still configure via the command line. Please see man chromium-browser
for more information on flags and environment variables.
EDIT 2
But even if I install dnss and run
dnss -enable_dns_to_https -https_upstream="https://1.1.1.1/dns-query
the url https://1.1.1.1/help
still displays :
|Connected to 1.1.1.1|No|
|Using DNS over HTTPS (DoH)|No|
|Using DNS over TLS (DoT)|No|
|Using DNS over WARP|No|
Final edit
I managed to do it with https://www.configserverfirewall.com/ubuntu-linux/ubuntu-set-dns-server/
I put 8.8.8.8,4.4.4.4 or 1.1.1.1 in additional DNS in IPv4 and flushed the cache with
sudo systemd-resolve --flush-caches
.
After that I disconnected the network connection and connected it again.
More info on DoH