How to Map Multiple Domains to One WordPress Install With SSL


I run a multisite that has multiple domain names pointed at it. For local development I like to replicate the same setup. But Local by Flywheel doesn’t support this out of the box. So here is how to make it work:

Note: This has only been tested for Macs. If you can fill in the differences for a Windows machine do let me know.

Setup a WordPress site like normal

Go to ~/Library/Application Support/Local by Flywheel/routes/ and duplicate the conf file of your site. Edit the server_name block of the duplicated file adding your new domain names like so:

server_name * *;

The generated SSL certificate only includes the root domain and any subdomains of that root domain. We’ll need to generate our own self-signed certificates to include multiple domains. I wrote a script to do that for you. Follow the instructions at Don’t forget to edit options.conf to add the domain names the generated certificate should cover. Take the generated certificate (.crt file) and private key (.key file) and copy them to ~/Library/Application Support/Local by Flywheel/routes/certs

Edit your hosts file to recognize the multiple domains. You can tack them on to the end of the entry created by Local by Flywheel:



Restart your site in the Local by Flywheel control panel.

If everything worked your custom domains should point to your WordPress site and be secured by a single valid SSL certificate.