Explained in plain words1 / 11

What is DNS?

The phone book of the internet.

example.com
DNS
a number address
By Pritam Sonone, Digital Pritam
The idea2 / 11

Names for people, numbers for computers

example.com
DNS
a number address

Every device online has a number address, called an IP address. DNS finds the number that goes with a name.

It takes milliseconds3 / 11

How a lookup works

ResolverAsks for you.
RootPoints to the right ending.
Top-level domainHandles one ending, like .in.
AuthoritativeHolds your records.
Cloudflare's library example4 / 11

The four servers, as a library

ResolverThe librarian.
RootThe library index.
Top-level domainOne rack of books.
AuthoritativeThe dictionary.
Caching5 / 11

Why repeat visits are quicker

TTLtime to live, in seconds

Your devices and internet provider keep a copy of the answer until the TTL ends. Hostinger's usual default is 4 hours.

The records you will meet6 / 11

Common DNS records

AName to an IPv4 address.
AAAASame, for IPv6.
CNAMEAn alias for another name.
MXWhere email goes.
TXTNotes, such as SPF.
NSThe nameservers.
Real output, 15 Nov 20267 / 11

What an answer looks like

$ dig digitalpritam.in MX +noall +answer
... MX 5 mx1.hostinger.com.
... MX 10 mx2.hostinger.com.

The lower number, 5, is tried first for our email.

Propagation8 / 11

Why a DNS change takes time

A few minutes to 24 hoursThe usual range, says Hostinger.
Up to 72 hoursRare.

It is really saved copies running out, one by one, as each TTL ends.

Try it9 / 11

Check DNS yourself

# Mac or Linux
$ dig yourdomain.com A
# Windows
> nslookup yourdomain.com

Or use an online DNS checker in your browser.

Avoid these10 / 11

Common DNS mistakes

Leaving old A or AAAA records behind.
Changing nameservers and forgetting email.
Typing nameservers from memory.
Testing too early.
Quick fixes11 / 11

When something looks wrong

Old page still showsA saved copy has not expired. Wait for the TTL.
DNS server not respondingUsually the network. Restart the router.
Read the DNS guide