As part of a tool I'm writing I want to have a diagnostic that will tell the user whether they have configured their domain's DNS correctly for a particular service. I want to query the authoritative DNS server for their domain so that I can bypass any cached results.
Python – How to find the authoritative DNS server for a domain using dnspython
dnsdnspythonpython
Related Topic
- Python – How to check for NaN values
- Python – How to count the occurrences of a list item
- Node.js – Simple DNS Server in Node.JS? (Primary/Authoritative DNS Server) (maybe ndns?)
- Python – How to install packages using pip according to the requirements.txt file from a local directory
- Github – Custom domain for GitHub project pages
Best Answer
Here's my attempt at this. It uses the system's standard DNS server for looking up the root server for the top-level domain and for resolving the names of the various DNS servers along the chain, which I think is appropriate because those names would presumably change very infrequently.
Here's some sample output: