0

I have a static website hosted on an azure CDN (Verizon premium plan). There is a custom domain associated with this, lets call it www.website.com.

When typing 'website.com' into the nav bar, it returns a DNS_PROBE_FINISHED_NXDOMAIN error. However when typing 'www.website.com' it returns fine.

Is there a way that 'website.com' can be mapped/redirected to 'www.website.com'?

James Brightman
  • 857
  • 2
  • 13
  • 23

2 Answers2

0

Your scenario is pointing apex domain to Azure Services, here Storage account.

Here is the Azure documentation which helps you to configure: https://learn.microsoft.com/en-us/azure/dns/dns-alias#point-zone-apex-to-azure-cdn-endpoints

Let me know if you have any questions while configuring.

msrini-MSIT
  • 1,444
  • 1
  • 7
  • 11
  • I followed the tutorial all the way until the 'Create the alias record's step, where it talks about selecting your Azure DNS zone - I do not have an existing Azure DNS zone. – James Brightman Oct 10 '19 at 10:09
  • If it's as simple as setting up an A record, can I do this on my domain hosting website? I already have a CNAME linking the CDN to the custom domain name. – James Brightman Oct 10 '19 at 10:10
  • CNAME doesn't support pointing to apex of your domain. You need to create a Azure DNS Zone and delegate your domain to Azure. Post that create an alias record to point the apex domain to Storage account. – msrini-MSIT Oct 10 '19 at 10:13
  • So there's no way to redirect example.com to www.example.com without migrating to Azure DNS zone? Not within the rule engine? – James Brightman Oct 10 '19 at 10:19
  • When someone query for example.com it needs to reach CDN so that you can do write rules in the rule engine. In order to point apex domain to Azure CDN you need to delegate your DNS to Azure DNS and then create Alias record. – msrini-MSIT Oct 10 '19 at 11:06
  • Appreciate your help, i've managed to fix it without having to migrate to Azure DNS - just using the DNS services of the domain service. – James Brightman Oct 10 '19 at 13:40
  • Can you elaborate the fix which can help other community members ? – msrini-MSIT Oct 10 '19 at 13:43
  • 1
    A simple redirect rule to map 'example.com' to 'www.example.com' - for reference the website is registered on namecheap.com – James Brightman Oct 10 '19 at 13:48
0

In this case, you could also enable the custom domain website.com in your Azure CDN. If so, you could host your custom domain in Azure DNS first then add an alias record that points to your Azure CDN endpoint in the DNS zone for your custom domain.

enter image description here

Nancy
  • 26,865
  • 3
  • 18
  • 34