Azure: site only works with or without “www”

I was setting up a new website instance today. With I first set up www.sedersoftware.com – I noticed that the site only came up with the www prefix, and it would not without it. On this new site, it was the other way around! It would come up with the URL formatted as example.com but not with http://www.example.com.

I know how to fix this in IIS – this is the host-header binding. But how do you fix this on Azure?

Well, it turns out those CNAME entries that it wants you to create, is how it does its’ host-header mapping. You have to add one for “www” and one for “non-www”, like the following:

awverify.www.example.com    awverify.example-site.azurewebsites.net.
awverify.example.com        awverify.example-site.azurewebsites.net.

In other words, wherever you have your DNS hosted, you have to create an additional CNAME record so that both the www and the non-www map to your site. I hope that helps someone else – this took me forever to find!!

Posted in Azure, Computers and Internet, Infrastructure, Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 5 other followers

%d bloggers like this: