See you later .dev!
Ask a developer of any kind what they use for their local development environment setup and you'll inevitably be given a response with such conviction that you'll wonder why you're not doing the same as they are. I'd hazard a guess that there's probably infinite different methods, setups and softwares available that ultimately all end with the same result.
Personally, I use MAMP for developing my websites locally. Sure i've dabbled with AMPPS here and there, i've worked with VM's for a couple of years and i definitely enjoyed my time on the dark side... working live on a server via FTP, but inevitably I found my way back to the blue elephant and the more pleasant experience of being able to control which version of PHP i wanted to use on a project by project basis (plus many other additional pieces of functionality that AMPPS didn't quite offer at that time).
Throughout the latter half of last year, I was working a lot with clients either onsite or directly inline with their in-house teams to deliver a number of awesome projects. Most of these were front-end projects where I didn't necessarily need the full MAMP stack to develop and so I opted for options like npm-live-server for the majority of my local development needs and it wasn't until I started work on a new client project which was to utilise the fantastic Craft CMS at the core that I needed to fire up MAMP and create a new project when i noticed something rather weird.
Going through my normal checklist setting up a project:
- MAMP Project Folder
- Local domain
- Local database
- Configure CMS/Admin Users
- Setup Git
- Install CMS
- Hook in database
- Visit local domain
Typically at this point, you're shown a fresh, vanilla install of whatever CMS you've installed and you can set about with whatever you've got lined up for it, however this time, I noticed that something I'd done had thrown a security error within Chrome. Weird? So I went through the setup again to see if I'd done something stupid in the config stage and added https:// or something to the local domain path of Craft.
Nope... nothing wrong.
To Google, and a million different reasons popping up from a million different sources. Some saying that i needed to set up a self-certified SSL, some saying that my localhost keychain had expired... everything and anything you could think about and none of the options thrown down before me were fixing my issue.
Now, it's not really like me to not be able to figure out (if not fix) a problem with something. I'm like a dog with a bone in that sense. There's something deep rooted in me that needs to find out the reason why something isn't working as intended. This issue, however, was eluding me.
The Chromium Project had updated and forced all domains with the .dev TLD to only respond to secure connections. Brilliant!Despite creating numerous self-certified SSL's, I was no closer to getting my local site working on Chrome or Safari. After another half hour of Googling and head-scratching, I saw a post by Daryl Koopersmith, that gave a reason and also a complete fix for my issue. Google had bought the rights to the .dev TLD and was making https mandatory on it. I don't know if I was still using old "techniques" when building websites locally but .dev is what I've always used as my local domain.
Maybe I just hadn't been paying attention, or I wasn't updating my local development tactics quickly enought, but the sheer rigmarole of chasing my tail caused me to lose a couple of precious hours of development time and replace it with stress and questions to try and figure out what the hell was going on.
As a result of this new information, I cracked open MAMP and changed all of my local project domains from .dev to .test, reconfigured all the CMS installs to the new TLD of .test and BOOM, everything was back to normal again. HURRAH! Cheers Daryl!
TL;DR
Every front-end developer/engineer/designer or otherwise who designs/builds/develops/tests websites using a .dev domain will be affected (if you haven't been already). In every major browser, I'd say a high percentage of locally developed websites will stop loading, and cause
1. The same time and pain that it caused me to try and figure out the issue...
2. A whole load of sad-faced Google icons to show up in front of you.
Use anything other than .dev as your local development TLD. Simple!
🡐 Older Note
Going freelance and why I made the jumpNewer Note 🡒
Coniston