简体   繁体   中英

How to set up Azure IP alias directly using DNS name?

I'm setting up my website on Azure service. My DNS zone is 'xxx.io' (for example). I can create address such as 'main.xxx.io' or 'web.xxx.io' using Alias record sets and they work well. But I can't access the website directly using 'xxx.io' as address. How do I achieve this?
PS: my colleague says it used to work but now it doesn't, and he doesn't know how either.

you can create a A record called @ with the value being IP address of your website. you cant have CNAME for @ (root domain). Well you can, but its against the rules (afaik).

If your website is hosting on Azure service like virtual machines. You could just add an A record named @ to point to the public IP address of Azure VM.

If your website is hosting on Azure web app service, you have to add an A and TXT type records in the DNS zone for using root domain. The app service plan(non-ASE) is multiple-tenant, you have to use TXT record to validate which website will be using the domain hostname.

The TXT record named @ , the value is mywebapp.azurewebsites.net ; The A record named @ , the value is your website public IP.

You could refer to this picture and get more details here . 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM