I use MAMP Pro for my Mac OS localhost WordPress development environment. Lately, I’ve been working with a few WordPress multisite subdomain installs, and I’ve been frustrated without the inability to setup a local Wildcard DNS using the
Hosts > General > Aliases option. Luckily, I found a work-around to enable Wildcard DNS on my localhost for each
Host I have set. Here’s how I did it:
Follow These Steps
- Open up MAMP Pro
- Go to:
File -> Edit Template -> Apache -> httpd.conf
- Search for this line:
- Add this directly below it:
- Restart MAMP.
That’s it, you now have a localhost wildcard DNS setup for your MAMP Pro development environment.
This will automatically add a wildcard
ServerAlias to all your MAMP Pro hosts, which you may or may not want depending on your situation.