更改名称服务器后子域不工作

Subdomain not working after changing the nameservers

我在 Microsoft Azure 中托管了我的网站。我已经从 register.com 购买了域名。

我在项目部署中使用了 Linux VM。

假设我的网站名称是example.com。我为它创建了一个名为 app.example.com

的子域

它工作正常,但当我在我的 Azure 帐户中创建 DNS 区域资源并在我的 register.com 站点中更新这些名称服务器名称时它不起作用。

根据您的描述,我们可以按照以下步骤设置 Azure DNS 区域和您的域名:
1. 通过 Azure 门户添加 记录集,指向您的 Azure VM:

2.Add NS记录到register.com,像这样:

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

几分钟后,我们可以使用 nslookup验证 名称解析是否有效:

nslookup -type=SOA jasonye.com

以下是上述命令的示例响应:

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

之后我们就可以通过IE访问这个网站了:

有关 Azure DNS 区域的更多信息,请查看此 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.