Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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?

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?

All Replies (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)