Our Control Panel provides an easy way to add and manage DNS records for your domains, but it can always be easier. Our new DNS Import feature will scan your domain and attempt to find any pre-existing A, CNAME, TXT, or MX records, automatically adding them for you.
You can find the Import Zone feature lurking in the top right when you’re viewing any of your zones, and it’s as simple as clicking and confirming.
Once the scan is complete you’ll be able to review the results and make any modifications or additions (including other types of records, like AAAA, or SRV) before saving the new records.
When would I use this?
DNS Import is perfect if you’re migrating your DNS management to SiteHost and don’t want the hassle of manually entering every record into the Control Panel. Just hit Import, review the results, and save.
Are there limitations?
This works by looking for records used for common host names, so it can’t catch everything. If you have a lot of esoteric hostnames, or layers of subdomains, things might get missed.
Also remember that the tool only looks for A, CNAME, TXT and MX records.
Extra for expert: how it works
DNS is oriented around querying for specific records and doesn’t give you a means to retrieve an entire zone (more on that later). With no ‘official’ way to gather information about a zone, that leaves only one real option: brute force, i.e. making a large number of DNS queries and hoping that some of them return valid records.
Unfortunately, the number of possibilities for valid record names is vast, and it’s not really practical to try every possible record, so what can we do? Humans are creatures of habit and most sites make use of certain common names (think www.example.com
, mx1.example.com
, or even just the bare domain name example.com
). Because of this we’re able to build up a sort of dictionary, using common hostnames and record types. When you import a zone, we issue a flurry of DNS queries based on this dictionary and use the results to build up a picture of the zone.
The result is that you get every record that is of one of the types that we look for (A, CNAME, TXT, or MX), and which conforms to our hostname 'dictionary'.
To get really geeky, it wasn't quite true when we said that there is no way to ask a nameserver to give you an entire zone. To explain why, we need to look further into the infrastructure behind DNS.
Each zone is managed by at least two nameservers, with one of them being designated as the “primary” and the rest as “secondaries”. The primary nameserver is where the records for a zone are maintained, but at some point they need to be distributed to the other nameservers. To handle this, the secondaries will regularly perform a special DNS request called an AXFR or zone transfer, and in response the primary nameserver will send the full contents of the zone. If you’re curious, you can actually try and initiate a zone transfer yourself with something like:
dig axfr example.com
You’ll most likely receive a response along the lines of “transfer failed”, but if not: congratulations! You just found a misconfigured nameserver! Enjoy your full collection of DNS records.
It's good practice for nameservers to have zone transfers disabled from everywhere except their secondary nameservers. This prevents accidental leaking of information. But it's also why tools like ours can't easily find everything.
Photo by Alina Grubnyak on Unsplash