I have created a static website in Azure, it gave me primary point url like <mystorageaccount>.<somerandomcode>.web.core.windows.net
which is working fine from the browser.
Now, I followed below steps to use custom domain but no so successful.
- created a
CNAME
with my DNS Service provider forwww.mydomain.com
- In Azure, storage accounts, mystorageaccount, Custom Domain, I entered
www.mydomain.com
but it throws error as
Failed to update storage account 'mystorageaccount'. Error: The custom domain name could not be verified. CNAME mapping from www.mydomain to any of .blob.core.windows.net,..web.core.windows.net does not exist.
What I tried?
1. I tried with mydomain.com
instead of www.mydomain.com
, it accepted and showed me a message that it takes 30 min to propagate.
After about an hour, when I tried www.mydomain.com
in the browser it throws me The request URI is invalid with HttpStatusCode: 400.
when I tried mydomain.com
, server is unavailable.
- in CMD,
ping mydomain.com
gives me some ip address so in DNS Settings I created A record with displayed IP address. After some time,mydomain.com
is working as expected butwww.mydomain.com
still gives meThe request URI is invalid with HttpStatusCode: 400.
Note:
1. This IP address may not be static so creating A record with IP is not correct.
2. I tried to point to a subdomain.mydomain.com
and at first attempt itself is working as expected but I want this to use to my mydomain.com
and www.mydomain.com
What is the solution to work with www. and without www. to custom domain?