1
@guns answer to another question (about DNS lookup) helped me out on this issue. Basically, if a site has an IPv6 address, you need that in your hosts file, too.
127.0.0.1 foo.com
::1 foo.com
0
set both www and non-www version of domain name at /etc/hosts
127.0.0.1 foo.com
127.0.0.1 www.foo.com
It is because firefox checks www.foo.com
domain after initial DNS response of no server at foo.com
0
This can be an issue due to a new feature called "DNS over HTTPS" (DoH).
To disable DNS over HTTPS go to Options -> General -> Network Settings. Then scroll down and deselect the checkmark in 'Enable DNS over HTTPs'
(In other languages, this is called differently, but should be found in Settings, if you search for "DNS")
0
I've ran into this problem before. It seems like Firefox is caching the /etc/hosts file in some fashion. Give it some time.
how do you force to clear it? I tried 'Clear your history' but that didn't help – rubo77 – 2020-02-12T01:38:29.133
Firefox doesn't do that. It uses the OS DNS resolver to convert names to IP addresses. So it depends on how the resolver is configured. Applications such as Firefox have nothing to do with it. – Keith – 2012-06-16T15:02:38.990
So how do I configure its resolver to resolve
foo.com
as127.0.0.1
? – A T – 2012-06-16T16:10:50.143Does Firefox have a proxy manually configured? If so DNS will be offloaded to the proxy server. – Zoredache – 2012-06-16T17:29:12.603
@AT That's a Windows admin thing, and I don't do Windows. The fact that that file is in a directory named "drivers" is completely bizarre. I think there is some GUI tool to set these. – Keith – 2012-06-16T17:53:29.593
@Zoredache Nope, it has precisely the same proxy settings as Chrome. Keith: Not sure. – A T – 2012-06-16T18:29:02.420