Azure CDN - Custom hostname without www not working (NameCheap) - azure

I'm trying to add a custom domain without www to Azure CDN services.
With www it's working perfectly. But without www I get an error (see first image)
I'd appreciate any help.

Refer to RFC 1912 - Section 2,4
A CNAME record is not allowed to coexist with any other data. In other
words, if suzy.podunk.xx is an alias for sue.podunk.xx, you can't also
have an MX record for suzy.podunk.edu, or an A record, or even a TXT
record.
a CNAME can not be used at the apex (aka root) of a domain, so we can not use the CNAME records for the root domain as the custom domain in the CDN profile.
As a workaround, set up a CNAME cdnverify.<yourdomain> to cdnverify.<endpoint>.azureedge.net. Once all is verified and set up (including SSL provisioning if desired), delete the CNAME and use ANAME for the root record. Read this blog for more details.
The official recommended method is to create alias records in the Azure DNS. See Point zone apex to Azure CDN endpoints. If so, you will delegate DNS zones with Azure DNS and configure alias records for your CDN profile.
Edit
Please note that
Pointing a zone apex to CDN endpoints for Azure CDN from Akamai is
currently not supported.
You could change to use other CDN tiers if you're using Azure CDN from Akamai.

Related

Azure DNS Zone - unable to find CDN endpoint in list when adding record

I've setup a static site with Azure WebsiteCDN with custom domain, which works correctly for www.mysite.com
Now I'm trying to create an alias record set in DNS Zones (to point to apex domain) however the list is always empty:
Any ideas why it doesn't show up?
Mapping your apex or root domain to your CDN endpoint basically requires CNAME flattening or DNS chasing. There are other DNS providers as well that support CNAME flattening or DNS chasing, however, Azure CDN recommends using Azure DNS for its customers for hosting their domains.
Refer : https://learn.microsoft.com/en-us/azure/cdn/onboard-apex-domain
If you are using a different provider than Azure DNS, then you would need to contact the DNS provider and check if they support CNAME flattening or if there is any way to achieve this on their end.
If it is not supported with your DNS provider, then you could delegate your domain to Azure DNS and manage your DNS records in Azure DNS and here you will be able to create an Alias record which will help you onboard your apex domain to Azure CDN.
Please refer : https://learn.microsoft.com/en-us/azure/dns/dns-domain-delegation
https://learn.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns
While selecting the CDN resource in alias record set, make sure you have selected the subscription in which the CDN endpoint is deployed.
Important Note : Pointing a zone apex to CDN endpoints for Azure CDN from Akamai is currently not supported.
Refer : https://learn.microsoft.com/en-us/azure/dns/dns-alias#point-zone-apex-to-azure-cdn-endpoints

Root domain in Azure FrontDoor configuration

I am trying to set up the routing for the Apex/root domain of my website(myrootdomain.eu) in Azure FrontDoor.
Reference :https://learn.microsoft.com/en-us/azure/frontdoor/front-door-how-to-onboard-apex-domain
Crated the Alias record with #.myrootdomain.eu in Azure DNS against the Azure resource as FrontDoor. A CNAME was created like this : afdverify.myrootdomain.eu
When i try adding the custom domain(myrootdomain.eu) into the frontend host of FrontDoor, it is giving the error CNAME record is not found. What additional step is required here .
Is there any setting or mapping to be done in my DNS 123domain or frontdoor for this domain : afdverify.myrootdomain.eu
What should be the mapping in domain provider (123domain in my case) for the naked domain(myrootdomain.eu) ?
Could not find any thing about that in the reference doc.
If you have hosted your domain in Azure DNS, (that is to edit the NS records and replace the NS records with the Azure DNS name servers in the registrar's DNS management page), you do not need to map in your original domain provider. It takes just a few seconds on my side to wait for the DNS taking place for the Apex/root domain in Azure Front Door.
After creating an alias record for zone apex, it creates a zone apex record pointing to your Front Door resource and also a CNAME record mapping 'afdverify' (example - afdverify.contosonews.com) to afdverify.<name>.azurefd.net.
If you have finished the above steps correctly, it usually takes some time for DNS propagation, you could check it via whatsmydns or viewdns. As the comment said, you can check if the CNAME is effective or not using nslookup or google dig tool.

How to configure DNS for Azure CDN with multiple endpoints and root

I own a domain "x.wiki" which is managed via domains.google
I have a website, which is split up into multiple endpoints using azure cdn.
sub1-x.azureedge.net - Subdomain 1 (intended site route with all content)
sub2-x.azureedge.net - Subdomain 2 (subdomain with limited
content)
sub3-x.azureedge.net - Subdomain 3 (subdomain with limited
content)
I want to serve these as follows.
www.x.wiki -> sub1-x.azureedge.net
x.wiki -> sub1-x.azureedge.net
sub2.x.wiki -> sub2-x.azureedge.net
sub3.x.wiki -> sub3-x.azureedge.net
currently it only works with www. / sub2. / sub3.
x.wiki doesnt resolve
Does anyone know how I can get this working correctly?
My understanding is that due to limitations with CNAME i cannot do this easily, however azureCDN to my knowledge does not give me an IP for use with custom domains.
Here is my DNS configuration.
You also use alias records to point your DNS zone apex x.wiki to Azure CDN endpoints. If your domain DNS provider does not support alias record for root domain, you could optionally to host your domain in Azure DNS.
In the Azure DNS zone, you could create an alias record like this,
Then, you will see one A record and one CNAME for your CDN endpoint.
After the records are verified, you could add the hostname x.wiki in the custom domain of your CDN endpoint.
Alternatively, you could try the workaround in this blog.
Set up a CNAME “cdnverify.” to
“cdnverify..azureedge.net”. Once all is verified and set up
(including SSL provisioning if desired), delete the CNAME and use
ANAME for the root record.
The answer to this is to redirect root to WWW from my DNS provider.
The cdnverify cname is not necessary.
https://www.tachyonstemplates.com/2018/google-domains-forward-root/
May re-open this if i still cant get adsense to resolve the root (because it is a redirect)

Delegate Subdomain to Azure via CNAME

the company I’m working for provided me a subdomain. test.mycomp.com . I want to add it to my azure web app via custom domain.
The azure system recommends a CNAME delegation and provided me the information to enter web-zeudz-staging.azurewebsites.net in the dns management as CNAME.
After doing so and verifiying via DNS Lookup, Azure always gives me „Domain Ownership Error“. What can I do to make this work?
Is your DNS provider also a CDN provider, for example cloudflare? If so, turn off the CDN/proxy function so it's a DNS only record and try again.
If you don't have any control over the CDN function you can use txt record validation.
Create your TXT record awverify.subdomain.test.mycomp.com with value web-zeudz-staging.azurewebsites.net and validate again. It should succeed.
There's also a CNAME awverify method but you need CDN disabled for that too.
I find it strange that your company doesn't have the option to enable/disabled CDN for any given DNS entry though.

Azure Websites DNS

I have an azure website at yis3.azurewebsites.net - I have promoted this to be a "shared" site so that I can use a custom domain. I have the domain yorkshireimagescanning.co.uk that I bought from 123-reg.co.uk. I have configured this to give a CName record with dnsname of "awverify" and destination of awverify.yis3.azurewebsites.net.
I've waited over 12 hours and checked on digwebinterface.com and all looks good but when I click to "Manage custom domains" from the Azure portal , I enter a domain name of "yorkshireimagescanning.co.uk" but it won't accept it.
Please help
* Edit *
I've now waited a couple of days for domain propagation. Here's a screen grab from my domain registrar:
In the azure portal I've tried to add the following custom domains for the yis3.azurewebsites.net site but it won't accept any:
awverify.www.yorkshireimagescanning.co.uk
www.yorkshireimagescanning.co.uk yorkshireimagescanning.co.uk
awverify.yorkshireimagescanning.co.uk
Here's a screen grab from the portal:
To use yorkshireimagescanning.co.uk
To use your domain without the www. prefix you need to add an A Record in addition to the CNAME you've added for "awverify".
First, make sure you've added the domain to the Azure portal by following the instructions under "Set the domain name in management portal" here.
Next, follow the instructions under "Configure an A record for the domain name" on the same page. This involves pointing your domain directly at the IP address of the Azure web site. You should then have added 2 DNS records in total:
CNAME awverify.www awverify.yis3.azurewebsites.net
A xx.xx.xx.xx (your website's IP address)
I've marked the next option as "preferred" because it points your domain at the Azure hostname "yis3.azurewebsites.net" instead of directly at the IP address. The IP address of your Azure website won't change, but if you ever need to deploy your website elsewhere it will have a different IP, so there will be a delay while the DNS change propagates.
To use www.yorkshireimagescanning.co.uk (preferred)
To use your domain with a www. prefix you need to add another CNAME record in addition to the one you've already added.
First, make sure you've added the domain to the Azure portal by following the instructions under "Set the domain name in management portal" here.
Next, follow the instructions under "Configure the CNAME on your domain registrar" on the same page. This involves adding a CNAME that points "www" to your Azure website's hostname (yis3.azurewebsites.net). You should then have added 2 DNS records in total:
CNAME awverify.www awverify.yis3.azurewebsites.net
CNAME www yis3.azurewebsites.net
A note about domain forwarding: Don't use 301 forwarding unless your site has been permanently moved. Use 302 for temporary redirection. More details here.
I finally figured out what was wrong. I was deploying a new version of an existing site but the old version still had www.yorkshireimagescanning.co.uk set on the custom domains page. Once I deleted it then I was able to add the domain on the new azure site.

Resources