Websites and web tools
Everything you need to know about DNS lookup
Every visit to a shop's website and every email to its inbox starts with a DNS lookup. This page explains the lookup chain, the record types a small business domain uses, the commands to inspect them, and how time to live (TTL) shapes a safe migration.
How a lookup travels
- Your device asks a recursive resolver, usually run by your network or a public resolver you chose.
- If the resolver has a fresh cached answer, it replies at once.
- If not, it asks a root server which servers handle the top-level domain, such as
.autosor.com. - The top-level domain servers point to the authoritative name servers for the domain.
- The authoritative server returns the record, and the resolver caches it for the record's TTL.
Record types you will meet
| Type | Purpose | Example use |
|---|---|---|
| A | Maps a name to an IPv4 address | The web host for the site |
| AAAA | Maps a name to an IPv6 address | Same host over IPv6 |
| CNAME | Makes one name an alias of another | www pointing at a hosting platform |
| MX | Names the mail servers and their priority | Where customer emails go |
| TXT | Free text, used for verification and mail policy | SPF, DKIM and DMARC entries |
| NS | Names the authoritative servers | Set at the registrar |
| CAA | Limits which certificate authorities may issue certificates | Lock HTTPS certificates to your provider |
| SOA | Zone metadata and serial number | Read by secondary servers |
A CNAME cannot sit at the bare domain alongside other records under the standard, which is why many DNS hosts offer a flattening or alias feature for the apex.
Commands to run
dig example.com Ashows the IPv4 answer and its remaining TTL.dig example.com MX +shortlists mail servers only.dig @1.1.1.1 example.comasks a specific resolver, useful to compare caches.dig +trace example.comwalks from the root down, showing each step.nslookup -type=TXT example.comworks on systems without dig.
TTL and a safe site move
TTL is the number of seconds a resolver may keep an answer. A value of 3600 means one hour; 86400 means 24 hours. When you move a site to a new host, resolvers that cached the old address keep using it until their copy expires.
Troubleshooting checklist
- Site works for some people only: compare answers from two resolvers; one may hold a stale cache.
- Email bouncing after a host change: check that MX records survived the move.
- New subdomain missing: confirm you edited the zone at the provider that the NS records name.
- Certificate errors after adding CAA: make sure your certificate provider is listed.
- Changes not visible: remember negative answers are cached too, for a time set in the SOA record.
Keep a plain text copy of your zone before any change. If something breaks, you can put the old values back in minutes instead of guessing.