20

we have a site that we recently moved to Azure, did the DNS mapping for www.sitename.com and also for sitename.com however when I access the site without any www prefix, it throws up an error. when I provide www. prefix it works fine.

what could I be missing ?

2
  • found the option within azure to map the root domain.
    – Vikram
    Oct 15, 2013 at 13:39
  • 4
    Vikram, could you add the answer here? Would be helpful for others Oct 16, 2013 at 14:11

4 Answers 4

24

Within Azure go to Domain Mappings and make an entry for sitename.com in addition to www.sitename.com ! that worked for me.. I remember trying to do that earlier, but Azure did not allow the entry without a www. originally (about a month back) but now it accepted and started working immediately.

1
  • 1
    THanks, This is correct but we also need to go through the steps told by @DotNetHaggis below. After that only Azure accepts "www". Aug 24, 2015 at 11:06
16

I also couldn't add my domain to Azure without the leading "www.". I realised that I should have had two CNAME DNS records set up instead of just one.

I had the following set up:

awverify.www CNAME awverify.XXXX.azurewebsites.net

But in order for you to register your url without the "www." prefix, you need to set up another CNAME in order for Azure to verify. I then added the following:

awverify CNAME awverify.XXXX.azurewebsites.net (as you can see I have added the same as above but the awverify doesn't have the suffix of ".www".

I could then verify Azure against the new CNAME record allowing me to register my url without the leading "www." with Azure.

0
1

As for April 2016.

If using A Record it's necessary to add CNAME for awverify.* subdomains. Azure needs that to assure that you have access to a given domain (A Record points at virtual IP that Azure gives)

When using CNAME it's only a case of adding a proper host and pointint it at *.azurewebsites.net. What's easy to forget is that when you want to point 'no www' domain ex. yourdomain.com at your Azure app host has to refered as @.

After that it's only a case of adding you custom domains in app panel. As for now (new Azure panel) it is:

your app -> Settings -> Custom domains and SSL -> Bring External Domains
1
  • Can't add a awverify.* to the portal.office365.com - how would you configure it to have both the xxx.azurewebsites.net as well as www.xxx.azurewebsites.net work with a custom domain name?
    – codeputer
    Jun 12, 2017 at 18:22
0

Wanted to coontribute an update to this thread since it just helped me out.

We have a custom domain in Azure that I needed to forward to our company's SharePoint Online (O365) account and couldn't get the non-www instance of the domain to forward.

In the Azure custom domain manager (GoDaddy), I was able to use the "Forwarding" option to specify that the domain be forwarded. This created an A record for www which forwards fine. There was no other way for me to add an A record for @, but in the "Subdomain" config of the Forwarding pane, I was able to enter "@" and specify the O365 address as the destination. This created an A record for @ and set it to forward correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.