When we started building RonReed.com, we decided to go with Microsoft Azure to see what the platform could do. The idea was, start with a personal website and use the cloud computing available in Azure to give the site additional functionality that another host can’t deliver. As I’m writing this, we’re in the personal website stage so keep that in mind as I begin to outline my experience with Microsoft Azure.
How to Install WordPress on Microsoft Azure
Perhaps not surprisingly, setting up WordPress on Azure was a piece of cake. If you’ve ever installed WordPress before, you know how awesome their one click installs are on other hosts. This was no different. The process is slightly different because on Azure WordPress is a web app, but it’s really not a big deal.
This is the tutorial I used How to Install WordPress on Microsoft Azure.
Creating a Backup of Your Azure Web App
I’ve been using WP Engine for a little over a year now for about 15 different installs and apart from the pricing, which is expensive when compared to bargain hosts, it is superb. This is what I’m comparing Microsoft Azure to. Two of my favorite functions in WP Engine are the daily backups and the site loading speed. These are available right out of the box. With WP Engine, there are no cache or backup plugins to install. If I break my site or it gets hacked, a couple clicks can bring it back.
Azure doesn’t have this functionality build right in, but it is not difficult to install. I used CloudCellar.com because they have a free option. I haven’t tried restoring the site from a backup yet, but it looks like you need to upgrade to a paid plan to do so. I’ll report back when I try to restore or if I find a better option, although even if I find something else, I’ll probably keep both, just in case.
For the initial personal site phase, we want to keep costs low so we can use the budget for the app development features we plan on implementing later, hence the free option, for now.
This is the tutorial I used How to Backup Windows Azure Websites
For whatever reason, I wasn’t able to install the Add-On from the store, so I went directly to cloudcellar.com and created an account that way.
How to Set Up a Custom Domain from Network Solutions on Microsoft Azure
Setting up the custom domain took much longer than it should have because all of the instructions available totally suck and make the process appear to be much more complicated than it actually is. Further, there are no instructions on how to set this up in Network Solutions, so that’s what I want to address with this section, although hopefully explanation will help you understand the overall process so you can apply it in your domain registrar. I find understanding what I was actually doing was the hardest part. It made troubleshooting later much easier once I knew why I was getting stuck.
1. Upgrading from Free Mode
Microsoft recently made changes to their Management Portal so if you’re trying to set up a custom domain and you’re wondering why you can’t find anything; you’re probably reading the reference material for a different version. I personally set up RonReed.com using the old portal so that’s what I’m familiar with and I know the resources that I’m providing below work; however, I did do my best to find references for the new portal, although without personally testing the process myself, I can’t be sure they’re entirely correct. Once I update to the new portal, I’ll set up a custom domain and report back.
Remember, what’s important here is the overall process. The process isn’t different depending on the portal.
First off, you’re going to have to upgrade your site from the Free mode if you haven’t already or you won’t be able to add a custom domain.
If you have the older dashboard, step 1 in this tutorial will help you navigate how to do this: How to Set Up a Custom Domain in Azure
If you’ve switched over to the new dashboard, refer to the Scaling to Shared or Basic Mode section on this page to upgrade. How to Scale WordPress on Azure
Shared is fine for our purposes right now, although you may have to upgrade again later if your purposes require it.
2. Setting Up an A Record
The next step is you need to find the IP address so you can create an A record.
To find your IP in the old portal go to CONFIGURE > MANAGE DOMAINS
In the new portal, you can reference this page Custom Domains on Azure. Go the section FIND THE VIRTUAL IP ADDRESS. There are screenshots further down on the page to help you.
Then you’re going to create a @ record. I usually use Namecheap, but for this site Ron had Network Solutions. The gist of it is you’re going to go to the A record section and add or modify the existing @ record. Add the IP address, set the TTL setting to 7200 or whatever the default specifies and save it.
I’ll link to a couple different ones below to help you set up an a record in your registrar. If you’ve never done this before, I suggest you set up the A record and wait until the next day to continue. DNS propagation can take 24-72 hours so if the next day you see the domain pointing to a Microsoft Azure error page, you know you did it right and can proceed. If you don’t see a Microsoft Azure error page, then you can continue to wait or double check to make sure you did it right.
- GoDaddy – Go to the section ADD A DNS RECORD FOR YOUR CUSTOM DOMAIN
- Network Solutions
3. Setting Up a CNAME Record to Verify the Domain
This next step is where I got stuck. You need to verify that you are authorized to configure the custom domain name. These are the instructions in Microsoft Azure:
You can point custom domain names to Microsoft Azure web apps. Microsoft Azure must verify that you are authorized to configure the custom domain name to point to your web app. To verify authorization, create a CNAME resource record with your DNS provider that points either from www.yourdomain.com to webappcontoso.azurewebsites.net or from awverify.www.yourdomain.com to awverify.webappcontoso.azurewebsites.net
I was like, um what? So let’s break it down. It’s giving you two options. I’m going to walk you through it as I change ronreed.azurewebsites.net to ronreed.com
Set up a CNAME record. The process is similar to the A record you created, but instead of @ use www and instead of an IP address, point it to webappname.azurewebsites.net
You’ll have two records:
@ pointing to your IP (A record)
www pointing to yoursite.azurewebsites.net (CNAME record)
In my case I created an CNAME record with www and pointed it to ronreed.azurewebsites.net
If you did option 1 and it worked congratulations, you’re done with this step. You don’t need option 2. For some reason option 1 didn’t work for me, so I used option 2.For option 2 instead of www for the host, you’re going to enter awverify and point it to yoursite.azurewebsites.net
I misunderstood and thought you had to enter the whole thing in the host name and I entered awverify.ronreed.com; this isn’t necessary because you’re modifying the record for that domain already, so entering it in the host name will give you awverify.ronreed.com.ronreed.com, so don’t do that.
Just like in option 1, you’re going to have two records
@ pointing to your IP (A record)
Awverify pointing to yoursite.azurewebsites.net (CNAME record)
In my case I created an CNAME record with awverify and pointed it to ronreed.azurewebsites.net
4. Adding the Domain to Azure
After that you have one more short step. Go back to where you found the IP address in the portal and add the custom domain name. Make sure you add one with www and one without. For example ronreed.com and www.ronreed.com. When you see a green checkmark next to the domain name, you can go test it out.
Then you want to go change the domain name in WordPress. As soon as you save you’re going to have to login again, but instead of going to yourdomain.azurewebsites.net/wp-admin you’re going to have to go to the new domain yourcustomdomain.com/wp-admin. Make sure you update your permalinks once you’re in.