It finally happened. After buying the .dev TLD a couple of years ago, Google have finally started doing something with it. The first step has arrived in Chrome 63, which hit my browser at 13:36 on the 14th December. All http:// requests are automatically redirected to https://. This change has broken the local development setup on my Mac.

Although a valiant step in the direction of local SSL development, I’m not clued up enough with self-signed certificates to implement that, especially not a week before breaking up for Christmas. Anyway, you’re here for a solution…

.dev to .test

I have the .dev tld routed to my /Users/trysmudford/Sites directory so points to /Users/trysmudford/Sites/anything - it’s very handy. So I need to swap to a new TLD and .test seems to do the trick. Here’s how I did it (OSX 10.12, native apache setup, dnsmasq provided by homebrew).

  1. Open Finder
  2. Click ‘Go’ in the top menu bar
  3. Click ‘Go to folder’
  4. Type in: /usr/local/etc/
  5. Hit ‘Go’
  6. Open dnsmasq.conf in your favourite text editor
  7. Copy the line: address=/.dev/
  8. Change new line to: address=/.test/
  9. Save this file
  10. Go to your terminal and type the following to restart dnsmasq (type in your password when promted):
    1. sudo launchctl stop homebrew.mxcl.dnsmasq
    2. sudo launchctl start homebrew.mxcl.dnsmasq
  11. Back to Finder
  12. ‘Go’, then ‘Go to folder’
    1. Type in: /etc/resolver/
  13. Copy the file named: dev
  14. Rename the new file to test

You may need to restart Apache with sudo apachectl restart. Disclaimer, this worked for me - I can’t guarantee it’ll work for you.

Hope this helps!