1

I need to know if there is a web browser using its own "hosts" file or simply ignoring the "hosts" file from OS.

UPDATE 1: This is the situation:

  • certain program requires certain URL for validation : not wanted
  • I need that URL for getting help : wanted

I tested with Firefox, Chromium, Vivaldi, Midori, and all of them read hosts file.

  • 4
    Could you be more specific on context of the why(s) of this question? – Rui F Ribeiro Apr 24 '19 at 12:47
  • 1
    @Christopher You should write that up as an answer. – Sparhawk Apr 24 '19 at 13:05
  • 1
    Making a web browser ignore the hosts file might not solve your problem. My guess is that access to external network (or just to that specific URL) is blocked by an external firewall, and the hosts entry exists just to make those requests fail without waiting for a TCP connection to time out, which would cause an annoying delay. – telcoM Apr 25 '19 at 5:49
  • I think i found one possible solution, please check my answer – Romeo Ninov May 11 '19 at 6:05
4

I do not know if there is browser based utility to do this. But you can do it for the entire OS. The key file is /etc/nsswitch.conf. To support only DNS records you should have record inside like:

hosts: DNS

if you need to have /etc/hosts and the file have precedence over DNS you need to have record like:

hosts: files DNS

EDIT: You can set Firefox to use DNS over https. Here you can find detailed instructions:

Type about:config in the Firefox address bar and then press enter. When Firefox asks, click on the button stating that you accept the risks.
In the search field enter network.trr to display all of the settings for Firefox's Trusted Recursive Resolver, which is the DNS-over-HTTPS Endpoint used by Firefox.
Double-click on network.trr.mode, enter 2 in the field, and press OK as shown below. This turns on DoH in Firefox.
Next you need to make sure the network.trr.uri is set to https://mozilla.cloudflare-dns.com/dns-query as this is Cloudflare's DoH DNS resolver that Firefox has partnered with for the test. If it is not set to this URL, please double-click on the setting and enter the URL. You can now close the about:config page.

Not the answer you're looking for? Browse other questions tagged or ask your own question.