Skip to content

Instantly share code, notes, and snippets.

@dgoodlad
Last active December 27, 2015 03:19
Show Gist options
  • Save dgoodlad/7258136 to your computer and use it in GitHub Desktop.
Save dgoodlad/7258136 to your computer and use it in GitHub Desktop.
When will my DNS server change propagate?

The dig command queries a nameserver and tells you all sorts of goodies. By default, it queries your local network's default nameserver. If you ask it for the NS records of a domain, you get something like what I've included in the other file below.

Each record returned has a TTL, measured in seconds. When that number of seconds expires, the cache is flushed and the nameserver will go out to the internet to get fresh values.

So, look at one of the NS records returned:

envatomarketplaces.com. 8839    IN      NS      ns7.markmonitor.com.
----------RR----------- -TTL--- -class- -type-- --------value-------

The TTL here is 8839, approximately 2.5 hours. In 2.5 hours, that record will flush, and we'll check with the internet for the most recent value.

$ dig NS envatomarketplaces.com
; <<>> DiG 9.8.3-P1 <<>> NS envatomarketplaces.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34514
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 6
;; QUESTION SECTION:
;envatomarketplaces.com. IN NS
;; ANSWER SECTION:
envatomarketplaces.com. 8839 IN NS ns3.markmonitor.com.
envatomarketplaces.com. 8839 IN NS ns6.markmonitor.com.
envatomarketplaces.com. 8839 IN NS ns2.markmonitor.com.
envatomarketplaces.com. 8839 IN NS ns1.markmonitor.com.
envatomarketplaces.com. 8839 IN NS ns4.markmonitor.com.
envatomarketplaces.com. 8839 IN NS ns5.markmonitor.com.
envatomarketplaces.com. 8839 IN NS ns7.markmonitor.com.
;; ADDITIONAL SECTION:
ns1.markmonitor.com. 68826 IN A 64.124.69.50
ns2.markmonitor.com. 69874 IN A 209.66.70.22
ns3.markmonitor.com. 77888 IN A 217.68.151.240
ns4.markmonitor.com. 69873 IN A 217.68.151.241
ns6.markmonitor.com. 73461 IN A 202.167.230.241
ns7.markmonitor.com. 69875 IN A 204.228.234.32
;; Query time: 68 msec
;; SERVER: 10.20.0.6#53(10.20.0.6)
;; WHEN: Fri Nov 1 09:11:52 2013
;; MSG SIZE rcvd: 274
$ dig NS @8.8.8.8 envatomarketplaces.com
; <<>> DiG 9.8.3-P1 <<>> NS @8.8.8.8 envatomarketplaces.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62550
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;envatomarketplaces.com. IN NS
;; ANSWER SECTION:
envatomarketplaces.com. 21599 IN NS ns-110.awsdns-13.com.
envatomarketplaces.com. 21599 IN NS ns-1493.awsdns-58.org.
envatomarketplaces.com. 21599 IN NS ns-1842.awsdns-38.co.uk.
envatomarketplaces.com. 21599 IN NS ns-714.awsdns-25.net.
;; Query time: 354 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Nov 1 09:19:17 2013
;; MSG SIZE rcvd: 177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment