WordPress Multisite Networks and Wildcard Sub-Domains
There is a lot of confusion over how to correctly set up WordPress Multisite Networks, not least with getting them configured correctly using wildcard subdomains.
What is a Wildcard sub-domain?
A wildcard allows for a subdomain of any name without having to specify each one, this is particularly useful for a WordPress Multisite Network – you can allow users to create their own sites on subdomains without worrying about changing the DNS / Host settings in your control panel.
Unfortunately, not all hosting providers support Wildcard’s so you may need to check this first before you continue – but most of the big boys- -Enom, Reg123 etc do.
The general rule is to set up a record that points to your server IP using an asterisk ( * ) instead of a name.
For example, your Host record might be:
* A 126.96.36.199
A common mistake in CPanel is to change the host record as above. CPanel requires a slightly different approach – you must create a new subdomain using an asterisk ( * ).
Note that if you already have a wildcard A record on your CPanel, this will cause errors and must be removed in order for you to create a wildcard subdomain.
What if my name servers are pointing elsewhere?
If your name servers are not pointing to your server and are being managed elsewhere, at Enom for example then you can simply combine these two techniques. Ensure that you have created a wildcard A record on your Providers’ DNS and also ensure that you create a wildcard subdomain in CPanel and you should be good to go!
Something in the article peaked your interest? We’re never more than a contact form or a quick call away so please don’t hesitate to get in touch!