A Short-Guide to Changing Valet’s Top-Level Domain
For years, developers have used the dev top-level domain as a way to work with local development versions of their projects.
But Google changed all of that last year.
If you’re interested in reading a bit more into this, check out the post by Justin from WebDevStudios does a good job of going into some of the details (as does this post via Daryl Koopersmith – previously working on WordPress, now working at Medium).
But for this post, I’m trying to keep it short and pragmatic. So, the former is this:
If you’re using HTTPS and a dev domain on your local machine, it’s likely going to stop working. Yes, you can add an exception with some browsers, but not all.
If you’ve read this blog for any particular length of time, then you know that I’m a fan of using Valet as part of my local development environment. Part of doing that means that I also secure the local sites to simulate, as much as possible, but staging and production are going to be like.
By default, Valet uses dev as it’s top-level domain, so how do we change that? Luckily, it’s pretty easy.