Just like enabling secure DNS (DNS-over-HTTPS or DoH) in the Google Chrome browser, Firefox also has this choice.
DoH when enabled encrypts all the DNS requests and protects your online browsing. Also, using a public DNS resolver with this acts as a filter and blocks malicious websites from opening. It is because these resolvers keep an updated database of such sites that may harm your PC. So, whenever those are accessed, they would be blocked automatically.
To enable DoH in Firefox:
Access Firefox preferences by typing in the address bar:
Then, click on the General section.
Scroll down to Network Settings and click on Settings.
Over here, enable the tick mark next to Enable DNS over HTTPS.
Firefox already has a couple of DNS resolvers added â€“ CloudFlare and NextDNS.
However, you can add others too like Google DNS, OpenDNS, and so on by selecting the Custom option from the drop-down menu.
There, enter the IP address of the custom DNS resolver that you would like to use.
Here are the IP addresses of some of the popular ones:
Checking DoH settings:
To check if DoH is enabled, go to any DNS testing website like dnsleaktest.com and choose Standard test.
After the test is completed, the DNS servers used by Firefox will be listed.
For CloudFlare DNS, you can also directly check it from the CloudFlare DNS test page here.
By the way, as this is also a browser-specific network setting, the DNS queries system-wide will not be changed.
For that, you would need to change the IP settings for the network adapter. Here is how to do that.