What Is DNS?

Every website on the internet is hosted on a server with a numerical IP address — something like 192.168.1.105. Humans aren't good at remembering strings of numbers, so the Domain Name System (DNS) was created as a solution. DNS acts as the internet's phonebook: when you type example.com into your browser, DNS translates that human-readable name into the IP address your computer needs to connect to the right server.

This all happens in milliseconds, completely invisibly to you.

How DNS Resolution Works — Step by Step

  1. You type a URL into your browser (e.g., rakmiya.com).
  2. Your device checks its local DNS cache. If it has recently looked up this domain, it uses the stored result.
  3. If not cached, your device asks your DNS resolver (usually provided by your ISP or a service like Google's 8.8.8.8).
  4. The resolver queries a Root Name Server, which directs it to the relevant Top-Level Domain (TLD) name server — e.g., the .com server.
  5. The TLD server directs the resolver to the domain's Authoritative Name Server.
  6. The authoritative server returns the IP address for the domain.
  7. Your browser connects to that IP address and loads the website.

Types of DNS Records

DNS is about more than just pointing domains to web servers. There are many record types, each serving a specific purpose:

Record Type Purpose Example
AMaps domain to an IPv4 addressexample.com → 93.184.216.34
AAAAMaps domain to an IPv6 addressexample.com → 2606:2800::1
CNAMEAlias pointing to another domainwww → example.com
MXSpecifies mail servers for the domainmail.example.com (priority 10)
TXTStores text info (SPF, DKIM, verification)v=spf1 include:... ~all
NSIdentifies the authoritative name serversns1.registrar.com
SOAStart of Authority — zone metadataSerial number, refresh timers
SRVService location records_sip._tcp.example.com

What Is TTL?

TTL (Time to Live) is a value attached to every DNS record that tells resolvers how long to cache the result before checking again. A TTL of 3600 means the record can be cached for one hour. Lower TTLs give you faster propagation when you make changes; higher TTLs reduce query load on your name servers. When planning a DNS change (like moving to a new host), lower your TTL a day or two in advance to speed up the transition.

Public DNS Resolvers Worth Knowing

By default, your device uses your ISP's DNS resolver. You can switch to alternative resolvers that may offer better speed or privacy:

  • Google Public DNS8.8.8.8 and 8.8.4.4
  • Cloudflare DNS1.1.1.1 and 1.0.0.1 (privacy-focused)
  • Quad99.9.9.9 (security filtering included)
  • OpenDNS208.67.222.222 (customisable filtering)

Troubleshooting DNS Problems

If a website isn't loading and you suspect a DNS issue, here are some useful diagnostic steps:

  • Flush your DNS cache — On Windows: ipconfig /flushdns. On macOS: sudo dscacheutil -flushcache.
  • Use nslookup or dig — Command-line tools that let you query DNS records directly: nslookup example.com or dig example.com A.
  • Try a different DNS resolver — Switch temporarily to 8.8.8.8 to rule out your ISP's resolver as the issue.
  • Check propagation — After a DNS change, use a tool like dnschecker.org to see if the new records have propagated worldwide.

Understanding DNS demystifies a lot of what happens "behind the scenes" every time you browse the web. With this knowledge, you're better equipped to manage domains, troubleshoot issues, and configure services like email and subdomains with confidence.