All Products
Search
Document Center

Alibaba Cloud DNS:Parsing effectiveness test methods

Last Updated:Jul 19, 2025

When you encounter abnormal situations such as website inaccessibility or DNS records not taking effect, you can use the following methods to first check the domain name status, and then troubleshoot the effectiveness of DNS records.

Use dig/nslookup commands for queries

The commonly used command query methods are dig (detailed information, suitable for debugging) or nslookup (supported by Windows by default).

Important

Determination method: If the result returned by the DNS query is consistent with what you set in Alibaba Cloud DNS, it means the resolution has taken effect.

If they are inconsistent, check the cache time. If the cache has not expired, wait until the cache expires before testing again.

If the cache has expired and the results are still inconsistent, see Quick troubleshooting for ineffective resolution.

Dig command

1. The most commonly used query command

Note

Command: dig your domain name (Example: dig example.com)

image

2. Query according to record type, such as MX, CNAME, NS, PTR, etc., just add the type after the command.

Note

Command: dig your domain name record type (Example: dig example.com NS)

image

Example of a scenario where resolution is not effective or no resolution record is set (Example: dig example.com CNAME).

image

3. Command to test whether resolution is effective by specifying the domain name DNS server. The following examples demonstrate how to check if resolution is effective using Alibaba Cloud DNS servers and public DNS servers.

Note

Alibaba Cloud DNS server command: dig your domain name @ns1.alidns.com (Example: dig example.com @ns1.alidns.com)

Public DNS server command: dig your domain name @223.5.5.5 (Example: dig example.com @223.5.5.5)

image

image

4. Use dig +trace parameter. After using this parameter, the process of querying from the root domain level by level will be displayed. The trace query can show the addresses of the authoritative servers for the root domain, top-level domain, and primary domain name, along with their respective return results, which is very helpful for tracking problems in DNS resolution.

Note

Command: dig <your domain name> +trace (Example: dig example.com +trace)

image

5. Obtain DNS egress IP by querying a special domain name to return the client's egress IP (i.e., the public IP of the local DNS server), confirming the real request source address after NAT or proxy (affecting CDN scheduling).

Note

Command: dig +short TXT whoami.ds.akahelp.net

image

6. Query the DNS servers used by a domain name.

Note

Command: dig ns your domain name (enter the primary domain name here)

image

7. You can determine the accuracy of intelligent resolution scheduling by specifying the client IP to query the resolution address returned by the authoritative DNS.

Note

Command: dig @authoritative DNS server domain name +subnet=specified client IP (Example: dig @ns1.alidns.com example.com +subnet=10.10.10.10)

image

Nslookup command

1. View local DNS resolution results.

Note

Command: nslookup <your domain name> (Example: nslookup example.com)

image

2. Specify public DNS to check resolution effectiveness.

Note

Command: nslookup your domain name public DNS (Example using Alibaba Cloud public DNS server: nslookup example.com 223.5.5.5)

image3. Query according to record type, such as MX, CNAME, NS, PTR, etc.

Note

Command: nslookup -type=record type your domain name (Example: nslookup -type=NS example.com)

image

4. View the resolution results of a domain name on a specified authoritative server.

Note

Command: nslookup your domain name authoritative server (Example: nslookup example.com ns1.alidns.com)

image