Reputation: 801
I have publish my asp.net core web app on azure and assigned custom domain to my web app such as www.example.com and example.com. I have changed the CNAME, A and TXT record and added my hostname without issue. However, the non-www, example.com, sometimes work and sometimes it doesn't and i get an Error 404 - Web App not found. The www.example.com is always working and i don't have any issue. I tried on multiple device and computers, different web browsers and sometime everything is fine for the non-www rule but sometime i get that 404 Error. What could possibly be the issue?
These are the records i added:
A Record:
www, @ and *
Txt Record:
www, @ and *
CNAME Record:
www, *
Upvotes: 0
Views: 1969
Reputation: 908
On your DNS registrar, in addition to 'www' A record, you have to create a host A record with key '@' (meaning everything else) pointing to your azure external IP address. Thus example.com must work properly.
Upvotes: 1