Talk to us today

Sri Lanka
  • 40/2/21, Chakkindarama Rd,
    Sri Lanka

Chrome Redirecting *.dev / *.foo to https

Chrome Redirecting *.dev / *.foo to https

Look no further if Google Chrome, is redirecting all your *.dev domains to HTTPS, its due to preloaded HTTP Strict Transport Security HSTS. 

After updating my Google Chrome to the latest available beta I couldn't access any of my dev sites. For all my projects I've been using a virtualhost with a .dev domain. So a project a would have a domain etc. All of these stopped working and started redirecting to https, however Safari and Firefox didn't. 

After wasting about half a day here is the issue.

The problem

The gTLD .dev is owned by Google, but still its not revealed what they are using it for. However this is a case where all my *.dev domains were redirected to https. With this commit they've added the following lines on to the Chromium HSTS preoaded list.

{"name": "dev", "include_subdomains": true, "mode": "force-https"},
{"name": "foo", "include_subdomains": true, "mo
de": "force-https"},


These force your domains to use https. And in my case even having self signed certificates installed with valid host records didn't let me use the sites.

Now what?

Now according to my understanding there is no other way to sort this issue that to use a different local domain. I am using mysite.localhost (its a bit too much to type in). There is no such rule for how you really name your local domains but it'd be idea to use a consistent naming convention for the ease of adding rules for different thirdparty services like TypeKit, Fonts, Reacptcha etc. 

Hope this post might save a bit of time for you with looking for answers for the redirections issue.