All Products
Search
Document Center

Check whether the DNS records take effect

Last Updated: Aug 27, 2020

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. Download and install dig.

Linux commands


1 . Query the domain name.

Command: dig test.dns-example.com


dig Domain name

The following example shows that the DNS records do not take effect or no records have been configured.
DNS records do not take effect


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 test.dns-example.com cname

CNAME record
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 test.dns-example.com @vip1.alidns.com

Command: dig test.dns-example.com @114.114.114.114


Authoritative DNS server
Public DNS server

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.
dig+trace
5 . Specify a local DNS server and check the complete resolution process of the domain name.

Command: dig Domain name @Local DNS server address +trace


dig command with a specified local DNS server
6 . Query the authoritative DNS servers of the domain name.

Command: dig ns Second-level domain name


dig command with the NS record type

7 . Specify a client IP address in the command to check whether the DNS records are returned based on intelligent DNS resolution.

Command: dig @Authoritative DNS server Domain Name +subnet=Client IP address


dig 1.1.1.1

Windows commands


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

Command: nslookup test.dns-example.com


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

Command: nslookup test.dns-example.com 114.114.114.114


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

Command: nslookup test.dns-example.com vip3.alidns.com


Authoritative DNS server
4 . Query non-A records. For example, to query the CNAME records, run the nslookup -q=CNAME www.dns-example.com command.
CNAME

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