How to check DNS propagation on Linux

Last updated on December 7, 2020 by Dan Nanni

While DNS introduces human-readable naming schemes for Internet hosts, it also brings with it extra overhead associated with resolving names to IP addresses. For end users, this overhead means additional DNS lookup latency for accessing any Internet host. For service providers, this implies the performance-critical DNS infrastructure that needs to be maintained. Minimizing these overheads has led to the extensive use of caching throughout DNS hierarchy. For example, there are web browser/OS's built-in DNS cache; DNS caching server of the local network; and the cache of local DNS servers operated by service providers, etc.

Such a deep chain of DNS caches has implication when it comes to updating DNS records. Oftentimes, when you update the DNS record of your host, the update is not immediately visible to the world. Instead, an old DNS record can temporarily be served from various DNS caches. Local DNS servers typically keep each DNS entry in their cache for up to a certain length of time, known as "time-to-live" (TTL), which can range from minutes to a day. Thus a typical DNS propagation delay (i.e., time taken to see any DNS update to propagate globally) is 24-48 hours.

If you would like to check how your DNS record propagates on the Internet, there are various online DNS lookup services you can try. Besides such third-party online services, there is a way to monitor DNS propagation natively on Linux.

Enter dnsyo.

dnsyo is a command line tool which performs DNS lookup of your domain name from various vantage points on the Internet. As of writing, dnsyo can query more than 1,800 open DNS resolvers belonging to 1,500 networks located in 33 countries worldwide. By comparing DNS lookup results from these servers, you can check if and how DNS has propagated on the Internet.

Install dnsyo on Linux

To install dnsyo on Ubuntu, Debian or Linux Mint:

$ sudo apt-get install python-pip
$ sudo pip install dnsyo --upgrade

To install dnsyo on CentOS, Fedora or RHEL:

$ sudo yum install python-pip
$ sudo pip install dnsyo --upgrade

Keep Track of DNS Propagation with dnsyo

By default, dnsyo randomly chooses 500 DNS servers (out of 1,800 or so servers), and performs DNS lookup from them. Periodically, dnsyo automatically downloads and updates a list of available DNS servers.

To check DNS lookup results of a domain name:

$ dnsyo

If you moved your domain name from one IP address to another, and the DNS record has not fully propagated globally, you may see the domain resolved to either IP addresses, depending on which DNS servers are used. In the above example, all responding DNS servers report the same IP address.

Note that many high-traffic websites employ DNS-based load balancing, where domain name is deliberately resolved to a pool of IP addresses. In such cases, a domain name will always be resolved to multiple IP addresses. Check with dnsyo for example:

To get more detailed info of the DNS query (e.g., IP address/location of each DNS server), use --extended option.

$ dnsyo --extended

Using dnsyo, you can also query a specific DNS record type. For example, to find the MX records of

$ dnsyo MX

Here is the complete command-line usage of dnsyo.

usage: dnsyo [options] domain [type]

Query lots of DNS servers and colate the results

positional arguments:
  domain                Domain to query
  type                  Record type (A, CNAME, MX, etc.)

optional arguments:
  -h, --help            show this help message and exit
  --resolvlist RESOLVLIST, -l RESOLVLIST
                        Location of the yaml resolvers list to download
  --verbose, -v         Extended debug info
  --simple, -s          Simple output mode (good for UNIX parsing)
  --extended, -x        Extended output mode including server addresses
  --threads THREADS, -t THREADS
                        Number of worker threads to use
  --servers SERVERS, -q SERVERS
                        Maximum number of servers to query (or ALL)
  --country COUNTRY, -c COUNTRY
                        Query servers by two letter country code

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean