Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.2k views
in Technique[技术] by (71.8m points)

azure - Subdomain not working after changing the nameservers

I have hosted my website in Microsoft Azure. I have purchased the domain from register.com.

I have used a Linux VM for my project deployment.

Suppose my website name is example.com. I have created a sub domain for it called app.example.com

It was working fine but its not working when i created a DNS Zone resource in my azure account & updated those nameserver name in my register.com site.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

According to your description, we can follow those steps to setup Azure DNS zone and your domain name:
1. Add record set via azure portal, point to your Azure VM: enter image description here

2.Add NS record to register.com, like this:

Host: web.jasonye.com  
Record type:     NS record  
Value:    ns1-01.azure-dns.com 

After a few mins, we can use nslookup to verify name resoution is working or not:

nslookup -type=SOA jasonye.com

The following is an example response from the preceding command:

C:Users>nslookup -type=SOA jasonye.com
Server:  UnKnown
Address:  2404:f801:10:12e:fe::2

Non-authoritative answer:
jasonye.com
        primary name server = ns1-01.azure-dns.com
        responsible mail addr = azuredns-hostmaster.microsoft.com
        serial  = 1
        refresh = 3600 (1 hour)
        retry   = 300 (5 mins)
        expire  = 2419200 (28 days)
        default TTL = 300 (5 mins)

ns1-01.azure-dns.com    internet address = 40.90.4.1

After that, we can access this web via IE: enter image description here

More information about Azure DNS zone, please check this link.

Each registrar has their own DNS management tools to change the name server records for a domain. In the registrar's DNS management page, edit the NS records and replace the NS records with the ones Azure DNS created.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...