InkdownInkdown
Start writing

Study

69 filesยท11 subfolders

Shared Workspace

Study
core
Revision w/ Whiteboard

DNS

Shared from "Study" on Inkdown

DNS, Nameservers, and Cloudflare: Concise Context

Core Idea

DNS is the internet's naming system. It converts human-readable domains like example.com into machine-usable answers, most commonly IP addresses, so browsers know which server to connect to.

DNS is not one central database. It is a distributed, hierarchical, cached lookup system.


Main Actors

ActorWhat it does
ICANNCoordinates global DNS governance and root-zone policy. It is not queried directly every time you visit a website.
CN Basics - 1
CN Basics - 2
DNS
Event loop
programming-language-concepts.md
zero-language-explanation.md
DB
Quick
databases-deep-dive.md
01-introduction.md
02-relational-databases.md
03-database-design.md
04-indexing.md
05-transactions-acid.md
06-nosql-databases.md
07-query-optimization.md
08-replication-ha.md
09-sharding-partitioning.md
10-caching-strategies.md
11-cap-theorem.md
12-connection-pooling.md
13-backup-recovery.md
14-monitoring.md
15-database-selection.md
README.md
JS
core topics
Event loop
Merlin Backend
01-Orchestration.md
02-DeepResearch.md
03-Search.md
04-Scraping.md
05-Streaming.md
06-MultiProviderLLM.md
07-MemoryAndContext.md
08-ErrorHandling.md
09-RateLimiting.md
10-TaskQueue.md
11-SecurityAndAuth.md
Orchestration-2nd-draft
Mobile
Build Alternative
Bundling
metro-bundler-deep-dive.md
OpenAI Agents Python
00_OVERVIEW.md
01_AGENT_SYSTEM.md
02_RUNNER_SYSTEM.md
03_TOOL_SYSTEM.md
04_ITEMS_SYSTEM.md
05_GUARDRAILS.md
06_HANDOFFS.md
07_MEMORY_SESSIONS.md
08_MODEL_PROVIDERS.md
09_SANDBOX_SYSTEM.md
10_TRACING.md
11_RUN_STATE.md
12_CONTEXT.md
13_LIFECYCLE_HOOKS.md
14_CONFIGURATION.md
15_ERROR_HANDLING.md
16_STREAMING.md
17_EXTENSIONS.md
18_MCP_INTEGRATION.md
19_BEST_PRACTICES.md
20_ARCHITECTURE_PATTERNS.md
opencode-study
context-handling
core
Python
Alembic
Basics
sqlalchemy - fastapi
SQLAlchemy overview
tweets
system_design_for_agentic_apps.md
Agent Loop
RegistryOperates a top-level domain, such as .com, .in, or .org. It stores delegation info for domains under that TLD.
RegistrarThe company where you buy/manage the domain registration, such as GoDaddy, Namecheap, or Cloudflare Registrar.
Recursive ResolverThe DNS server your device asks first. It performs the lookup on your behalf. Examples: ISP DNS, Google 8.8.8.8, Cloudflare 1.1.1.1.
Root NameserverTells the resolver which TLD nameservers handle a TLD like .com.
TLD NameserverTells the resolver which authoritative nameservers handle a specific domain like example.com.
Authoritative NameserverHolds the official DNS records for a domain. This is the final source of truth.
Website ServerThe actual server that hosts and serves the website after DNS resolution is complete.

Important Correction

When a user types google.com, the request does not go to ICANN first.

The real flow is:

  1. Browser checks its own DNS cache.
  2. Operating system checks local cache and host mappings.
  3. Recursive resolver receives the query.
  4. Resolver asks root nameservers where to find .com.
  5. Resolver asks .com TLD nameservers where to find google.com.
  6. Resolver asks Google's authoritative nameservers for the record.
  7. Resolver returns the answer to the user's device.
  8. Browser connects to the returned IP address.

DNS Lookup Flow

Rendering diagramโ€ฆ

What a Nameserver Is

A nameserver is a DNS server that answers DNS questions.

When people say "your domain's nameservers," they usually mean the authoritative nameservers assigned to your domain.

These nameservers hold and serve records such as:

  • A: domain to IPv4 address
  • AAAA: domain to IPv6 address
  • CNAME: alias to another hostname
  • MX: mail servers
  • TXT: verification, SPF, DKIM, etc.
  • NS: which nameservers are authoritative
  • SOA: zone metadata

The nameserver does not host your website. It only answers DNS questions.


Registrar vs Nameserver

ConceptMeaning
RegistrarWhere the domain is registered and owned.
NameserverWhere the domain's DNS records are officially answered from.
Hosting ServerWhere the actual website files/app run.

A domain can be registered at GoDaddy while using Cloudflare nameservers. These are separate roles.


GoDaddy to Cloudflare Example

When you buy a domain from GoDaddy, GoDaddy may initially provide default nameservers like:

Text

That means GoDaddy's DNS servers are authoritative for your domain.

When Cloudflare asks you to replace those with nameservers like:

Text

Cloudflare is asking to become the authoritative DNS provider for your domain.

You are telling the TLD registry:

For this domain, ask Cloudflare's nameservers for the official DNS answers.

This does not necessarily transfer the domain registration from GoDaddy to Cloudflare. It only changes who controls and serves the DNS zone.


Nameserver Change Flow

Rendering diagramโ€ฆ

Why Cloudflare Needs Nameserver Control

Cloudflare needs to be authoritative for your DNS if it is going to manage DNS records and optionally proxy traffic.

Once Cloudflare is authoritative, it can:

  • Serve your DNS records
  • Proxy web traffic through Cloudflare IPs
  • Hide your origin server IP
  • Provide CDN caching
  • Provide SSL/TLS handling
  • Apply DDoS protection
  • Apply firewall/security rules
  • Provide traffic and DNS analytics

If GoDaddy nameservers remain active, Cloudflare is not the authoritative DNS source.


What the Registry Stores

The TLD registry usually does not store your website IP directly.

For example.com, the .com registry mainly stores delegation info:

Text

Then the authoritative nameservers store the actual DNS records:

Text

Complete Mental Model

Rendering diagramโ€ฆ

Simple analogy:

Internet ConceptAnalogy
RegistrarPlace where you legally register the shop name
RegistryGovernment database for that category of shop names
NameserverFront desk that gives directions
DNS recordsDirection book behind the front desk
Website serverActual shop/room where the content exists

Final Summary

A nameserver attached to your domain is the DNS authority for that domain.

Changing nameservers changes who the internet asks for your domain's official DNS records.

It does not automatically move your domain registration or website hosting. It only changes the authoritative DNS provider.

So the cleanest model is:

Text