Hosting & Security 3 min read

DNS Explained: How Domains Point to Websites

DNS is the internet's phonebook, turning domain names into server addresses. Learn the main DNS record types, how to point a domain to hosting, what propagation means and how DNS affects email.

On this page

Key takeaways

  • DNS (Domain Name System) translates domain names like iftikhar.in into server addresses.
  • Key records: A/AAAA (website), CNAME (aliases), MX (email), TXT (verification, SPF, DKIM, DMARC), NS (who manages DNS).
  • Changes take effect after the record’s TTL expires — lower it before planned changes.

Whenever a website “doesn’t load after moving hosts” or “emails stopped working”, DNS is usually involved. Understanding a few record types makes these situations far less stressful — and helps you avoid them.

How a DNS lookup works#

  1. You type iftikhar.in; your device asks a DNS resolver (often your ISP, Google 8.8.8.8 or Cloudflare 1.1.1.1).
  2. The resolver asks the root servers, then the .in servers, which point to your domain’s nameservers.
  3. Your nameservers answer with the record — e.g. the server IP address.
  4. The browser connects to that IP. The answer is cached for the TTL period.

Common DNS records#

Record Purpose Example
NS Which provider hosts your DNS ns1.cloudflare.com
A Points a name to an IPv4 address @ → 203.0.113.10
AAAA Points a name to an IPv6 address @ → 2001:db8::10
CNAME Alias to another name www → iftikhar.in
MX Mail servers for the domain @ → smtp.google.com (priority 1)
TXT Verification and email security Google verification, SPF, DMARC
CAA Which authorities may issue SSL certificates 0 issue "letsencrypt.org"

Registrar vs DNS host vs web host#

These can be three different companies:

  • Registrar: where you bought the domain (and set nameservers).
  • DNS host: where records are edited (the registrar, Cloudflare, or your web host).
  • Web host: where the site files live.

Knowing which is which avoids editing records in the wrong place — a very common mistake.

Need a hand with this?

Get a quick, honest review of your website’s SEO.

Chat on WhatsApp

TTL and propagation#

TTL (time to live) tells resolvers how long to cache a record, in seconds. A TTL of 86400 means up to a day for changes to be seen everywhere. Before a migration, lower TTL to 300 (5 minutes) a day in advance; raise it again afterwards.

Common tasks#

  • Point a domain to new hosting: update the A record (or change nameservers if the host manages DNS).
  • Set up email: add MX records from your email provider, plus SPF, DKIM and DMARC TXT records — see email deliverability.
  • Verify Search Console: add a TXT record — see Search Console guide.
  • Use Cloudflare: change nameservers to Cloudflare — see Cloudflare setup.

Troubleshooting#

  • Check records with dig iftikhar.in A, nslookup or online tools like dnschecker.org.
  • Make sure only one A record points to the right server (old records cause random results).
  • Don’t delete MX records when changing website hosting — email will stop.
  • Flush local DNS cache if your own computer shows old results.

DNS FAQ#

Does DNS affect SEO?#

Slow or unreliable DNS adds delay and can cause downtime. A fast DNS provider like Cloudflare helps.

How long does DNS propagation take?#

From minutes to 48 hours, depending on TTLs and caches.

Can I use a CNAME on the root domain?#

Standard DNS doesn’t allow it, but providers like Cloudflare offer “CNAME flattening” or ALIAS records.

Found this useful? Share it

Join the discussion

Your email address will not be published. Required fields are marked *

Security code image. If you cannot read it, press refresh or contact me on WhatsApp.