The latest Firefox 96.0 as well as 95.0.2 (and possibly other versions) have an issue which prevents the browser from establishing any connections when DNS over HTTPS (DOH) is enabled. Simply disabling this option once enabled doesn’t make the issue go away. Read on to see how to fix this.
With DNS over HTTPS enabled on Firefox 96.0 and 95.0.2, besides not being able to access any websites, the browser hangs in the background when closed. The issue affects Linux, Windows, and macOS Firefox users alike.
As a temporary workaround, until Mozilla fixes this, open
about:config in Firefox, type
network.http.http3.enabled and double click it to set it to
false, like in the screenshot above. It’s worth noting that you can leave the DNS over HTTPS option enabled after this, and Firefox will be able to load websites without any issues.
After making this change, restart Firefox, and it should work again. Since Firefox hangs in the background, make sure you kill all its running processes after closing its window, or logout / relogin.