Dnsyo 从全球1500个DNS服务器中检查你的DNS解析


Download .zip

Download .tar.gz

View on GitHub


DNSYO is a little tool I built to help me keep track of DNS propagation.

In short, it's nslookup, if nslookup queried over 1500 servers and collated their results.

Here's what it does

$ dnsyo -t 100 -q ALL example.com
Status: Queried 1804 of 1804 servers, duration: 0:00:09.334441
I asked 1804 servers for A records related to example.com,
1771 responded with records and 33 gave errors
Here are the results;
1738 servers responded with;
26 servers responded with;
1 servers responded with;
1 servers responded with;
1 servers responded with;
1 servers responded with;
2 servers responded with;
1 servers responded with;
And here are the errors;
8 servers responded with;
No Nameservers
4 servers responded with;
No Answer
21 servers responded with;
Server Timeout


DNSYO requires Python 2.6 or later. The easiest way to install is by running

pip install dnsyo --upgrade

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

You should probably install it within a virtualenv.

If all goes well, you should be clear to start querying stuff

To test, try running

dnsyo google.com

It will query 500 random DNS servers in the database, and give you the results.


For more information on the flags run dnsyo -h

Output modes

DNSYO has 3 output modes;

  • standard - Will display all the results and errors from querying
  • extended - Same as standard but includes the names and addresses of the servers it queried
  • simple - Simple output mode which is useful for UNIX scripting

To change output mode, pass ether --extended or --simple to DNSYO.

Resolver list

DNSYO periodically updates it's internal resolver database from this repo. The first time you run it, and once every 2 weeks, it will try to download the resolver-list.yml file and store it to ~/.dnsyo-resovers-list.yaml directory. If you know of any more open DNS resolvers feel free to add them to the list.

By default, DNSYO will pick 500 servers at random from it's list to query. You can change this with the --servers or -q flag. If you want DNSYO to query all the servers just pass --servers=ALL or -q=ALL.

Record types

Just like dig, you can pass the record type as the second positional argument to DNSYO, so to get Google's MX records just do

dnsyo google.com MX


DNSYO is released under the MIT licence, see LICENCE.txt for more info


Module documentation is available for dnsyo, you can view the module documentation as generated by epydoc or docco



To check DNS lookup results of a domain name:

$ dnsyo xmodulo.com


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 Twitter.com 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 xmodulo.com


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

 dnsyo google.com 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



  • 😉
  • 😐
  • 😡
  • 😈
  • 🙂
  • 😯
  • 🙁
  • 🙄
  • 😛
  • 😳
  • 😮
  • emoji-mrgree
  • 😆
  • 💡
  • 😀
  • 👿
  • 😥
  • 😎
  • ➡
  • 😕
  • ❓
  • ❗
  • 69 queries in 0.252 seconds