All Products
Search
Document Center

Alibaba Cloud DNS:Check whether the DNS records take effect

Last Updated:Feb 24, 2023

Overview

You can use one of the following methods to check whether the DNS records of your domain name take effect:

  • Use the dig or nslookup command.

  • Overseas analysis validation test.

Use the dig or nslookup command

The dig and nslookup commands are used to query domain names. If the DNS records returned by the commands are the same as the DNS records you configured on Alibaba Cloud DNS, the DNS records take effect. Otherwise, check the TTL values of the records and perform the test again after the TTL expires.

Linux commands

1 . Query the domain name.

Command: dig domain

Example: dig www.dns-example.topdig domain

2 . Query DNS records of a specified type, for example, MX, CNAME, NS, or PTR. You can specify a record type at the end of the command.

Command: dig domain cnameExample: dig www.dns-example.top cname

dig cname

3 . Query DNS records from a specified DNS server. In the following commands, an authoritative DNS server provided by Alibaba Cloud DNS and a public DNS server are specified:

Command: dig domain @NS SERVER

Example: dig dns-example.top @vip7.alidns.comdig03

4 . Use the +trace option in the dig command to track the complete resolution process of the domain name. The command output includes information about the root DNS servers, top-level DNS servers, and authoritative DNS servers of the domain name and the DNS records they return.

Command: dig domain +trace

Example: dig dns-example.top +trace

dig04

5 . Specify a local DNS server and check the complete resolution process of the domain name.

Command: dig domain @local DNS server address +trace

Example: dig dns-example.top @114.114.114.114 +trace

dig06

Windows commands

1 . Query the domain name from a local DNS server.

Command: nslookup domain

Example: nslookup dns-example.topnslookup

2 . Query the domain name from a public DNS server.

Command: nslookup domain NS server

Example: nslookup dns-example.top 114.114.114.114

nslookup01

3 . Query the domain name from an authoritative DNS server.

Command: nslookup domain DNS servername

Example: nslookup dns-example.top vip7.alidns.com

nslookup02

4 . Query non-A records. For example, to query the CNAME records.

Command: nslookup -q=cname domain

Example: nslookup -q=cname test.dns-example.topnslookup06

Overseas analysis validation test

You can use tools to test the effectiveness of the resolution of the domain name overseas. If the DNS records returned by the tool are the same as the DNS records you configured, the DNS records take effect. Otherwise, check the TTL values of the records and perform the test again after the TTL expires.

DNS test tool