Don't start a search for my local tld

For local web development purposes, I use the Firefox web browser and laravel valet. Here's how to make sure your local domain opens your website in Firefox, not search it on the internet.

For local web development purposes, I use the Firefox web browser and laravel valet. It easily gives a local url to use for your project.

I configured the url to use the .loc tld, mainly because I prefer that to the other options, it reminds of localhost while being shorter.

One of my issue with Firefox has been that for those domains, unless I use valet secure to enable https, instead of opening my website, it would start a google search for the text.

Typing 'mevtho.loc' would result in a new google search for 'mevtho.loc'. That forced me to manually type the full URL, including http. So, 'http://mevtho.loc' would bring me to the website.

I have finally taken the time and figured out how to prevent this behaviour :

  1. Head to firefox settings, using about:config in the URL bar
  2. Type the following setting string : browser.fixup.domainsuffixwhitelist.<tld>, replacing <tld> by what you want to use. In my case : browser.fixup.domainsuffixwhitelist.loc and set the value to boolean true.
  3. Open a new tab and try your URL, it should now work as expected, not starting any google search.