CNAME not resolving to Azure Static Website

I’ve created a new website on Azure using their new Azure Static Website feature. I owned the domain Algorist dot io through google domains. I created a free account on Cloudflare and added the two Name Servers to my domains.google.com account under Name Servers (Use custom name servers). After this, I created two cname entries: www → https:// thankful-smoke-059c81910 dot azurestaticapps dot net/ is DNS only and algorist dot io → www dot algorist dot io is proxied.

When I go to thankful-smoke-059c81910 dot azurestaticapps dot net/, it resolves perfectly. When I go to www.algorist dot io or algorist dot io, I get a 404 site not found. I flushed my dns to no avail

tracert algorist.io

Tracing route to algorist dot io [172.67.153.179]
over a maximum of 30 hops:

1 1 ms <1 ms <1 ms amplifi.lan [192.168.124.1]
2 8 ms 8 ms 9 ms 96.120.17.89
3 9 ms 9 ms 8 ms [68.85.253.173]
4 15 ms 8 ms 12 ms
5 16 ms 11 ms 14 ms
6 13 ms 14 ms 13 ms 69.241.81.138
7 10 ms 9 ms 9 ms 172.67.153.179 <------ This is Cloudflare!!

Trace complete.

nslookup -q=CNAME www dot algorist dot io
Server: amplifi dot lan
Address: 192.168.124.1

Non-authoritative answer:
www dot algorist dot io canonical name = thankful-smoke-059c81910 dot azurestaticapps dot net

What should I do for this issue? I just want it to resolve and then I want to start setting up pages!

root domain should point to Azure IP.

Since you are using Azure Static Web Apps, you should follow the documentation here so that they knows you are doing a CNAME pointing:

Thank you. I’ll follow this documentation.

1 Like

Something like this

I went through this documentation. It directed me here: How to configure a root domain in an Azure Static Web App - Burke Knows Words

I followed the steps in that step by step instruction and I started having the errors that I posted above.

Try to disable the proxy for www first.

Did you validate the custom domain in Azure?

Error 404 is coming from Azure right? So definitely is not DNS issue.

1 Like

I am getting a site can’t be reached now after trying the suggestions above.

How about the validation?

I don’t really know what to do from here. This is my first time setting this up. I have the CI/CD set up. It deploys to azure. I can get to the website using azures goofy url. I don’t know what to do at this point.

Yes, I have validated the custom domain in azure

It just started working!!! Thank you for that Eric.

1 Like

Great. Welcome.

I do have one more issue. When I put the url algorist.io into a text message, it is redirecting to algorist.io/*

Is this a Cloudflare redirect issue or is this something else?

Did you configure any page rules?

Also, when I visit algorist.io I still get Error 404 from Azure. Use page rules to redirect algorist.io to www.algorist.io, and make sure algorist.io is proxied:

https://support.cloudflare.com/hc/en-us/articles/200172286-Configuring-URL-forwarding-or-redirects-with-Cloudflare-Page-Rules

Notice how your algorist dot io link is going to algorist dot io/* ? Why is it doing that?

I was able to replicate your issue.

Can you check your page rules? Share the screenshot.

Somehow your issue has disappeared :thinking: