Skip to main content

DNSWait

dnswait is a small script to wait for the "propagation" of a namserver configuration.

There's no such thing as DNS propagation

What make your browser don't hit your server right after you've configured the zone, this long frustrating delay from hours to days, is the effect of caches, not "propagation".

Try it yourself next time you set up a new entry: just don't hit it before configuring it, so its absence is not stored in any caches. Only when configured try it and boom, cache miss all the way up, no delay, it just works.

There may be some time though between the moment you ask your registrar to set an entry (via their web user interface or their API) and the moment it's really visible on their nameservers, that time I agree to call "propagation", and that's what's being monitored by this script.

Usage

Say you've added a TXT record containing itsme to proove you're the owner of example.com, via the interface of a low-cost hosting company, and they display a nice message:

Please wait a few minutes for our scripts to propagate the change to our DNS servers.

Then you can run:

dnswait example.com TXT itsme

the script will wait for all the authoritative servers of example.com to serve itsme for your text entry, so you know exactly what those few minutes were, you don't have to guess.

Another example

Say you're the owner of mdk.fr (it's me) and your provider only allows you to change DNS records using issues on their bug tracker, then submit the issue asking them to set 51.15.187.166 as the IP for mdk.fr and run:

dnswait mdk.fr A 51.15.187.166

so you'll know when they do it.

If they reply "it's done" while dnswait don't see it, they probably messed up something...

Using in shell scripts

If you have a shell script updating DNS configuration via an API, you can use dnswait in them to wait for the configuration to be done.

Verbose

If you want to see what's happening, run with -v or -vv:

$ dnswait mdk.fr A 51.15.187.166 -v
INFO:dnswait:3 authoritative name servers to check.
INFO:dnswait:All authoritative servers have the expected value.

or:

$ dnswait mdk.fr A 51.15.187.166 -vv
INFO:dnswait:3 authoritative name servers to check.
DEBUG:dnswait:Checking ns-69-a.gandi.net.
DEBUG:dnswait:ns-69-a.gandi.net. have the expected value!
DEBUG:dnswait:Checking ns-173-b.gandi.net.
DEBUG:dnswait:ns-173-b.gandi.net. have the expected value!
DEBUG:dnswait:Checking ns-127-c.gandi.net.
DEBUG:dnswait:ns-127-c.gandi.net. have the expected value!
INFO:dnswait:All authoritative servers have the expected value.

Metadata

Release files for dnswait 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dnswait 0.0.1
File Size Uploaded
dnswait-0.0.1.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dnswait 0.0.1
File Interpreter ABI Platform
dnswait-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.7 kB

Release files / dnswait-0.0.1.tar.gz

Download URL dnswait-0.0.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1aae6e305812f08622513b566648cdb486c336b92982d77c01833e81d57efee8
BLAKE2b-256 checksum
How to use checksums
b436d3d379f5ed5b7e3cdee417408f8322084150d802747259ea188ee27f5771
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / dnswait-0.0.1-py3-none-any.whl

Download URL dnswait-0.0.1-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8e2e22d8bb4c3b9bebc642c2198947a9f321d262c42521006dd07317e625dc0
BLAKE2b-256 checksum
How to use checksums
1f4254842c467424a7995be0857b95943bb0e698b35a00eab48b188764564ff6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page