How a DNS lookup works
- You type a domain into your browser.
- Your device asks a DNS resolver, usually run by your internet provider or a service such as Cloudflare or Google.
- If the resolver doesn’t have the answer cached, it asks the root servers, then the servers for the top-level domain (such as .com), then the domain’s own name servers.
- The IP address comes back, and the browser connects to the website’s server.
This usually takes milliseconds, and answers are cached for a set time, called the TTL (time to live).
Common DNS records
- A and AAAA: point a domain to an IPv4 or IPv6 address.
- CNAME: points one name to another, such as www to the main domain.
- MX: says where the domain’s email should be delivered.
- TXT: holds text such as SPF, DKIM and DMARC records for email, and verification codes for tools like Google Search Console.
- NS: names the servers responsible for the domain.
DNS and SEO
DNS doesn’t affect rankings directly, but slow or failing DNS makes a site slow or unreachable, for visitors and for Googlebot. Use a reliable DNS provider, keep records tidy when you change hosts, and lower the TTL before a migration so the changes take effect quickly.
DNS example
A company moves its website to a new host. The new host gives a different IP address, so the company changes the A record for example.com. Because the old record had a TTL of 24 hours, some visitors keep reaching the old server for up to a day. The team lowers the TTL a day before the next change, so the switch takes minutes instead.
DNS checklist for a website owner
- Know where your DNS is managed: your registrar, host or a service such as Cloudflare.
- Check the A or AAAA record and the www CNAME point to the right place.
- Keep MX records correct, or email stops arriving.
- Add TXT records for SPF, DKIM and DMARC, and for site verification in Google Search Console.
- Lower the TTL before planned changes, and restore it after.
- Turn on registrar lock and two-step login for your domain account.
DNS mistakes
- Deleting records you do not recognise, such as ones used for email or verification.
- Letting the domain registration expire.
- Making DNS changes during a busy period with no rollback plan.
- Forgetting that changes take time to spread.
DNS FAQs
Does DNS affect SEO?
A slow or unreliable DNS can slow your pages, and errors can make the site unreachable to crawlers. See page speed and CDNs.
What is an IP address?
The numeric address of a server. See IP address and ccTLDs.