Stop 01 · Internet & Web BasicsTopics · 3/14

DNS

Part of the Frontend Developer Roadmap

In short

You type a website name, but computers find each other using IP addresses, which are just numbers. DNS is the phonebook that turns names into numbers, and it runs before every page you visit.

The Domain Name System translates human-readable domain names (like google.com) into IP addresses that computers use to locate servers. A DNS lookup can involve caches, recursive resolvers, root servers, TLD servers, and authoritative name servers before the browser receives the address it needs.

The jaadu finds a name in a phone contact list and taps call.

Think of it like this

Your phone's contact list

You remember 'Mummy', not her 10-digit number. Your phone looks the number up for you. DNS does the same for websites: you remember the name, it finds the IP address.

Watch it happen

Finding google.com

Browser
Resolver
Root & .com
Name server

google.com?

1/6The browser has no saved answer, so it asks a resolver (usually your ISP's).

The big ideas

What you need to know

Names to IP addresses

DNS converts a domain like google.com into the IP address of the server that hosts it.

Lookups go step by step

If nobody nearby knows the answer, a resolver asks the root servers, then the .com servers, then the domain's own name server.

Answers get cached

Your browser, OS and ISP remember answers for a while (the TTL), so repeat visits skip the lookup.

Records do different jobs

An A record points to an IPv4 address, a CNAME points one name to another, and MX tells email where to go.

See it in code

A tiny example

bash
1# Find the IP address behind a domain2nslookup google.com3 4# More detail, including the TTL in seconds5dig google.com A6 7# Who handles email for this domain?8dig gmail.com MX

In the dig output, look at the ANSWER SECTION. The number next to the name is the TTL: how long resolvers may cache this answer.

Save yourself the pain

Common mistakes

Oops

Changing a DNS record and expecting the whole world to see it instantly.

Do this instead

Wait for the old TTL to run out. Lower the TTL a day before a planned change so the new value spreads faster.

Oops

Thinking the domain itself stores your website.

Do this instead

The domain only points to a server. Your files live on that server or hosting platform.

Your mission

Look up your favourite sites

~10 min

Quick check

You moved your site to a new server and updated the A record, but some friends still see the old site. Why?

Go deeper

  1. 1Run `nslookup` or `dig` on a domain to see DNS resolution in action. Validate your understanding by applying it in a small practical example.
  2. 2Learn the difference between A, CNAME and MX records. Focus on understanding the underlying reason it works, not only memorizing the definition.
  3. 3Understand how DNS caching affects how fast a site loads for repeat visitors.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge