Azure wants us to use a CNAME to name mywordpresssite.cloudapp.net -> www.mywordpresssite.com
This won’t work in DNS due to CNAME restrictions:
mywordpresssite.cloudapp.net -> mywordpresssite.com
You need an A record and we can’t have A records in Azure because Azure uses elastic IPs. (dynamic IPs)
So, how do I config a multi-sited wordpress when I can’t use A records for the root?
I want this when I’m done:
www.mysite.com
catchyphrase1.mysite.com
catchyphrase2.mysite.com
catchyphrase3.mysite.com
I do not want this:
www.mysite.com
catchyphrase1.www.mysite.com
catchyphrase2.www.mysite.com
catchyphrase3.www.mysite.com
Nor this:
www.mysite.com
www.mysite.comcatchyphrase1
www.mysite.comcatchyphrase2
www.mysite.comcatchyphrase3
I’m afraid there isn’t a great answer to this problem.
The simplest solution is to just use the IP address that you do get when you first deploy to Azure (this is visible in the portal if you look close enough) and then make sure that you only ever do in place upgrades. While the IP address can change, according to this blog post from Microsoft it should only change if you actually delete your instance.
Another option (not a good one, but I’ve already said there aren’t any good ones) is to setup another site somewhere like appharbor (which does allow you to host one site free) that does allow you to have an IP address that simply redirects to http://www.mysite.com
I believe that there are also some virtual DNS services out there that can also take control of managing your IP addresses, but as far as I’m aware they all cost. I’m happy to be proven wrong about this though.