How to force Firefox to search localhost prior to searching the internet.
I am building a new website on an Ubuntu 20.04 server with a LEMP stack. To test the web server (nginx) I set up a simple test site named nginxtest.com. Nginx server block tests are successful and there are no errors in any logs, so it appears that it is working properly. However, when I attempt to show the site by putting the site name into Firefox, all I get is a notice from Verizon that it has no knowledge of the website (which it shouldn't as it's not a registered name).
I want FIrefox to search localhost for my test site, but the only way I can make it work is to change the network-dns-native-is-localhost setting to true (default is false) in the about:config settings. When I change that setting, my test site pops right up, but then I can't reach any site on the internet.
How can I force Firefox to direct web searches to localhost before going out to the internet?
Semua Balasan (1)
I'm not very familiar with DNS resolution on Linux, so bear with me.
It sounds as though you are using your standard ISP DNS and not Firefox's DNS-over-HTTPS (DoH) feature.
Have you set up an entry in the hosts file for this hostname <==> IP address pair? https://en.wikipedia.org/wiki/Hosts_(file)