blog.atwork.at

news and know-how about microsoft, technology, cloud and more.

Manage custom domains in Azure Websites step-by-step

Since we often create Azure Websites I want to show a step-by-step guide how to use custom domains with your Azure Website. In my case I´m using the ISP GoDaddy.com and their web-interface and the Azure portal.

Custom domain

To use custom domains see also our previous post Manage custom domains in Azure websites.

So I want to add the custom domain office365conference.net to an Azure website with an Umbraco web (this CMS can handle multiple-domains). We already created the website with the Azure website-URL office365pillscall4papers.azurewebsites.net - sorry, I didn´t have a shorter one Zwinkerndes Smiley.

Basically each Azure Website is accessible with <yourweb>.azurewebsites.net. We now add our custom domain(s) to that website.

Open the portals

First, login at www.godaddy.com and the Azure portal (or in future at https://portal.azure.com).

Currently the GoDaddy portal sometimes adds records with the wrong type, so we came along to use the "classic" Zone File Editor - interface https://dns.godaddy.com/Default.aspx which works perfectly.

We can switch to the "classic DNS manager" in the domain interface (see the link in the blue line) - or with the URL above.

image

Cleanup the DNS zone file

First of all we want to delete all unnecessary entries (we don´t use email at this time with that domain). like in this screenshot:

image

..and "Save Zone File".

image

Confirm the dialog "Your changes have been submitted. These changes usually take 1 hour...". We know that...

On the Azure side

Ok, now switch to the Azure portal, click on the website and go to configure menu.
In here open "manage domains".

image

We need to add some DNS entries based on the information in the website configuration.
(Here there are already some custom domains existing.)

image

DNS entry #1: www

Create a CNAME entry www.<yourdomain>.com to <yourweb>.azurewebsites.net.

So click the pencil icon in the line of the CNAME entry of "www" and add your Azure domain.
Then click "Save Zone File".

image

When this is done, in the Azure website configuration we should add the www entry, here www.office365conference.net. It should work and a small green ok icon at the end of the textbox should appear - and the black checkmark and delete icons at the right side.

image

If the DNS query works, the host header is updated to the website.

DNS entry #2: awverify

Now we want to use the custom domain without www - with the root domain. For that we need to add the awverify entry to show that the custom domain is ours. We do this by adding another CNAME entry like here:

awverify.<yourdomain>.com to awverify.<yourweb>.azurewebsites.net

In our case: awverify.office365conference.net to awverify.office365pillscall4papers.azurewebsites.net

So we in the CNAME section we click "Quick Add" and type in the DNS infos fo the subdomain with "awverify".

 

image

...and finally the root entry itself.

DNS entry #3: Root

We change the A-record and point it to the IP address the Azure portal provides us.
So I edit the "@" Host entry with the pencil icon.

@ to <yourIP>

image

...and change it to (in our case, see the following screenshot) 137.135.129.175.

image

So we do this DNS-pointing to the IP address and "Save Zone File":

image

 

The finished DNS Zone file

So the whole DNS Zone looks like here: 3 entries pointing to the Azure Website.

image

That´s it on the DNS panel.

Custom root domain in Azure website

Now we need to add our custom domain with the www subdomain in Azure.

In our sample that´s: office365conference.net

image

And that´s it. All host headers should now work. In my sample there are several of them.

image

Test it

If everything works, your website should be accessible with both URLs:

  • office365conference.net
  • www.office365conference.net
  • (... and the ones already existing before of course ...)

Your website

If your website or CMS can manage multiple host header names, don´t forget to configure them in the backend. In my case I added them to the corresponding nodes in Umbraco CMS.

image

So if an URL with one of the known hst header names are coming in, the CMS knows which node and which page has to be shown.

Thanks

...to my colleague Martina Grom for the tips!

See also our blogpost Manage custom domains in Azure websites.

Happy managing your Azure webs and custom domains!

Comments (1) -

  • Toni

    1/18/2015 9:12:16 PM |

    Just FYI:

    See this article in azure.microsoft.com about "Enable SSL for your custom Domain":
    azure.microsoft.com/.../

    ...and dont forget to enable HTTPS for custom domain names, you must configure your website for Standard web hosting plan mode.

Loading