Michiel Kempen

Michiel Kempen

Hi, I'm Michiel, a passionate cloud engineer, full-stack webdeveloper,
and entrepreneur. I love to learn, teach, and build awesome things.
Currently making the cloud accessible at Smoothy.cloud ☁️🚀

.dev domains not resolving due to Laravel Valet #

Last week, I wanted to pay a visit to Freek Van der Herten's blog, which is nowadays hosted under freek.dev. To my surprise, I wasn't able to reach the website. I checked whether the website was down for everyone or just me, but it turned out it was just me.

Had Freek blocked my IP address from his webserver? 🤔 Probably not.

My web browser showed me the error message DNS_PROBE_FINISHED_NXDOMAIN. This suggested that there was something wrong with the DNS configuration on my Macbook.

Web browser error

After some digging through the filesystem of my computer, I found the directory /etc/resolver/. When I listed the contents of the directory, I saw the following:

> ls /etc/resolver/
dev  test

This tipped me off as to what the problem could be.

Back in the days, I used Laravel Valet as my local PHP server. One of the handy features that it offered was the ability to serve your application code using a local .dev domain. For example, I could run a local version of my website on http://michielkempen.dev.

The day that Google announced that they were going to start selling .dev domains, Laravel Valet switched from the .dev extension to the .test extension.

When I stopped using Laravel Valet, I apparently didn't properly uninstall the service. The dev and test resolvers were still hanging around, routing all the requests to the respective extension into a black hole.

To solve the problem, I simply cleared the /etc/resolver directory using the following commands:

sudo rm /etc/resolver/dev
sudo rm /etc/resolver/test

After that, I tried to reach freek.dev once again, and saw the following:

Freek Van der Herten's blog

Mystery solved! ✨

Beautiful code snippets in LaTeX using the Minted package and Visual Studio Code
Generate HTTPS URLs when running Laravel behind a proxy