So you just tried to set up a new Multisite WordPress (sub-domain) installation and the sub-sites are not resolving … what went wrong?!
Following all of the common articles (including one I wrote some time ago) I ran into this problem. Why could I not get any of the sub-sites I created to resolve?
I re-read several articles and my web hosting service’s documentation, everything appeared to be set up correctly. The key to all of this being to ensure “Wildcard DNS” is enabled on the site. There are many tutorials on this you can easily find with your preferred search engine but they all essentially say the same thing: you want to add the * sub-domain to your top level domain (TLD), such as, *.example.com
This is where I’m going to get a bit specific (as this may not apply to all web hosting services but it did work in the case of mine, HostGator). I followed their documentation to create the Wildcard DNS sub-domain and it appeared to work correctly. This created a DNS Zone file “A” record pointing sub-domains to the domain’s IP address, but this did not allow the sub-sites to resolve correctly for the Multisite installation.
Looking at the other DNS Zone file records I noted several similar “CNAME” records that were being used for common sub-domains such as “mail”, “www”, and “ftp” … and this became the key to unlocking the problem I was having.
I simply edited the “A” record for the Wildcard DNS and changed it to a “CNAME” record using the same domain as the other records (instead of the IP address) and now everything seems to be working just fine … well, the sub-site domains are resolving. Since this Multisite installation will be used exclusively for testing I suspect many other things will be broken.
This worked for my installation and I suspect it will work for most instances that are similar.
Let me know if it helped you out … or not, in the comments below; or, if you have another working solution, by all means, please share it below, too.