Azure Storage account static website custom domain without www - azure

I've got my React app running on azure Storage account static website (frontend only). I've bought a domain and attached it to static website following this instructions - https://learn.microsoft.com/en-us/azure/storage/blobs/storage-custom-domain-name
All great - I've managed to access the website using www.mydomain.com
However, the issue is that looks like to be able to access it without the www bit I'll have to use Azure CDN which looks pretty pricey.
Does anyone know if there is a way to access my domain without www without using Azure CDN?

• Yes, you can map the Azure storage account’s static website created with the custom domain through the public DNS zone created in Azure and accordingly creating a ‘CNAME’ record for it in the DNS zone. Once, you create a ‘CNAME’ record for the static website’s custom domain mapped with any other hostname or DNS record other than ‘www’, you will be able to access the website with that DNS record/FQDN or IP address mapped along with it.
• Please find the below snapshots given for the configuration done regarding the above. Accordingly, I have deployed the static website in the storage account and enabled the CDN in it too. Then, I deployed a DNS zone for the custom domain name in which I created a ‘CNAME’ host record for the static website’s created endpoint URL and tried to access it and it was successful. I also ensured that the DNS record created was not ‘www’*.
Please find the below link for more detailed information regarding the above configuration: -
https://learn.microsoft.com/en-us/azure/cdn/cdn-map-content-to-custom-domain?tabs=azure-dns%2Cazure-portal%2Cazure-portal-cleanup

Related

Adding a custom domain name (NOT a subdomain) to a static site hosted on Azure Storage

I have a domain registered through GoDaddy.
Currently there is an A record where:
Host: #
Points To: IP Address
This is pointing to a server that is currently serving the site.
I also have the site in an Azure Storage static web blob, and the endpoint is serving up the site and all is good.
I have tried registering a custom domain via the "asverify" method (see below), and Azure reports that it works. My custom domain "example.com" is accepted and all appears good except, navigating to https://example.com never works (after disabling the A record above).
Create a CNAME record with your DNS provider that points from the "asverify" subdomain (like asverify.www.contoso.com) to asverify.staticweb.blob.core.windows.net or asverify.staticweb.z5.web.core.windows.net. After this step completes, enter your domain below (exclude the 'asverify' subdomain). This method does not incur any downtime. To use this method, select the 'Use indirect CNAME validation' checkbox.
I have done something similar previously with AppServices. I have another domain that I have added to an AppService that is not a subdomain (so it is https://anotherexample.com NOT https://www.anotherexample.com). That was done with adding a TXT record to the DNS at GoDaddy, and works perfectly.
Does Azure Storage allow you to do this with a non-subdomain? That is the only way that I want to access the site.
Does Azure Storage allow you to do this with a non-subdomain?
Unfortunately, Azure Storage does not allow you to use non-subdomains to perform this operation. The subdomain is required, root domains are not supported.
please see:here.
While Azure Storage doesn't allow it as stated by the other anwser. You could very easily place an Azure CDN infront of it that does. To do this from the portal just go to the storage resource and search for the Azure CDN blade. From there you can create an endpoint to the storage or its static website. After creating the endpoint you can go to the resource and use the Custom Domain blade to set it up using a CNAME record.

Azure CDN custom domain for .lk not working

We have hosted our static website under storage account and we want to point that to our custom domain(not .com we have a .lk domain(srilanka)). As per microsoft documentation we have added a CNAME record under our domain. Even we have added the cdnverify also. But that domain is not recognized under the azure cdn custom domain. We have waited more than a day. But we have tested with one .com domain that works fine. Any extra configurations we need to do for .lk domains?
As mentioned in the comment
Make sure your blob container is public .
To confirm that your custom domain is mapped to your blob service
endpoint, create a blob in a public container within your storage
account.
Validate the CDN endpoint is properly configured

Unable to access CDN endpoint via custom subdomain

my team and I are currently exploring using Azure static site blobs and CDN endpoints to host several web apps.
We have successfully deployed our static files to the blog storage and our entire test app loads on both the primary (name.abc.web.core.windows.net) and CDN (name.azureedge.net) endpoints. When it comes to mapping a custom subdomain via the “cdnverify” temporary step, however, I am unsuccessful.
I have very carefully followed and quintuple-checked all steps in the support doc "Tutorial: Add a custom domain to your Azure CDN endpoint" (here).
This is my current DNS config (via Namecheap).
When I skip the cdnverify step, e.g. assign the azureedge CNAME value directly to a host called “v2”, and add that as a custom domain in my Azure portal CDN blade, the subdomain begins loading the CDN endpoint and can even have a CDN-managed HTTPS cert deployed with no manual verification. A dig command to this host (v2.ourdomain.org) finds an expected response (view here).
Here's the rub, though. If I assign a CNAME host of “cdnverify.static” to “cdnverify.name.azureedge.net.” and add it as a custom domain in the portal’s CDN blade, however, this secondary subdomain never loads our endpoint, and cannot deploy an HTTPS cert. The Azure portal verified this host when added to the endpoint and a dig command to “cdnverify.static.ourdomain.org” shows this answer, which looks good.
A dig command to “static.ourdomain.org” returns no answer and a ping command says “unknown host”. This is expected since I’ve not created such a record yet, and so I am wondering how we’re meant to ensure this subdomain is verified as per the “Verify the custom domain” section in the above-mentioned doc.
It’s very important for us that the cdnverify host works and can be assigned a certificate before we permanently re-locate our domains as these apps are already in production. At this point, I am at a loss over what to try next. If possible, I’d love to know what step(s) I am missing, or what can further be done to diagnose the issue.
Many thanks to anybody who might have some advice!
The cdnverify subdomain is to create a temporary CNAME mapping to avoid interruption of web traffic. With this method, users can access your domain without interruption while the DNS mapping occurs. If you have not any existing web app work, you can skip the cdnverify step.
From your description, "a dig command to cdnverify.static.ourdomain.org shows this answer, which looks good." It indicates that the cdnverify host works and you have verified that. You just need to associate the custom domain with your CDN endpoint.
In this step, you enter your custom domain like static.ourdomain.org, including the subdomain. Do not use the cdnverify subdomain name.
After you have added the custom domain static.ourdomain.org successfully in the CDN endpoint.
At this point, your custom domain has been verified by Azure, but
traffic to your domain is not yet being routed to your CDN endpoint.
After waiting long enough to allow the custom domain settings to
propagate to the CDN edge nodes (90 minutes for Azure CDN from
Verizon, 1-2 minutes for Azure CDN from Akamai), return to your DNS
registrar's web site and create another CNAME record that maps your
subdomain to your CDN endpoint. For example, specify the subdomain as
www or cdn, and the hostname as .azureedge.net. With
this step, the registration of your custom domain is complete.
After you have completed the registration of your custom domain, verify that custom domain references your CDN endpoint.
Finally, you could freely remove the cdnverify CNAME record in your domain provider as it was necessary only as an intermediary step..
Ref: https://github.com/uglide/azure-content/blob/master/articles/cdn/cdn-map-content-to-custom-domain.md#how-to-map-custom-domain-to-content-delivery-network-cdn-endpoint

Problem about setting custom domain for static web on Files Storage Azure

Problem about setting custom domain for static web on Files Storage Azure.
I already added domain in config screen and set cname in domain but still didn't worked.
enter image description here
The problem is that you are mapping a root domain, not subdomains. From Configure a custom domain name for your Azure storage account,
The mapping does only work for subdomains (e.g. www.contoso.com). If
you want to have your web endpoint available on the root domain (e.g.
contoso.com), then you have to Add a custom domain to your Azure CDN
endpoint.
In this case, you can try to use a subdomain like sub.contoso.com in your DNS provider. Otherwise, you need a CDN endpoint for that root domain. For more details, you can get from this blog.

DNS_PROBE_FINISHED_NXDOMAIN error when conntecting to 'website.com' but not 'www.website.com'

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'?
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.
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.

Resources