Domain registration and DNS

Deepak Singh
4 min readFeb 7, 2022

This article will help you develop a good intuition about various interrelated topics such as Domain Registration, Domain Name System, Root servers, DNS resolution process, and how they fit together.

Domain Registration

Domain registration means reserving a domain for an end-user for a certain period for a fee. The main entities involved in the domain registration process are :

  • Registrant is the end-user who wants to reserve a specific domain name.
  • Registrar is the service providers like GoDaddy, Namecheap, Bluehost, etc.
  • Registries manage top-level domains like .com, .net, etc. e.g. Verisign.
  • Governing bodies like IANA & ICANN.
Domain registration hierarchy

The entities involved in the domain registration process are arranged hierarchically. At the top is ICANN, the governing body which creates rules and processes to coordinate the domain name system. ICANN recognizes a handful of organizations called Registries/Registry operators who manage TLDs (Top Level Domain). Registries sell the domains to Registrars like GoDaddy, Bluehost, Squarespace, DreamHost, etc. who can then sell to different resellers. Registrants are the “end users” and get the domain names from either the registrars or resellers.

PRO TIP — Registries own all domains. Registrants only get to lease the domain for a certain time.

A word about WHOIS

WHOIS is a database maintained by the ICANN. It contains the contact information of the person responsible for a given domain. The registrant (user) generally provides the domain contact details e.g. name, address, email address, telephone number, admin contact details, etc. during the domain registration process.

Domain Name System

Domain name system consists of 3 key elements — DNS server (nameserver), zone files, and records.

  • Nameserver — A nameserver is a DNS server that stores the zone file and all the associated records for a given domain. There are usually two nameservers defined for each domain — primary and backup; however, registries and registrars have many horizontally scalable nameserver instances.
  • Zone file — contains the pertinent information that defines the “zone” that a nameserver manages.

A typical DNS server has 3 types of zone files

  • forward lookup zone file resolves hostname to IP address. The file name starts with the name of the domain followed by .dns. e.g. yourdomainname.dns.
Forward lookup mapping FQDN to IP address
  • reverse lookup zone file resolves IP addresses to FQDN (fully qualified domain name). The file naming convention is interesting e.g. if the network id is a.b.c.0, then the reverse lookup zone file would be named as c.b.a.in-addr.arpa.dns.
Reverse lookup mapping IP address to FQDN
  • cache file contains the hostnames and IP addresses of the root name servers

The forward lookup zone file is one of the most important zone files. It contains a record of all entries about a domain. The zone file starts with a header called Start of Authority (SOA), which consists of multiple types of records

  1. NS (nameserver record)
  2. A (address record) — IPv4 Address
  3. AAAA (address record) — IPv6 Address
  4. CNAME (canonical name record) — alias for other domain names
  5. MX (mail exchange record)
  6. TXT (text records)

PRO TIP — name entries in the zone file end with a period (.) The zone filename also ends with a period.

Let’s look at some of the critical records in a zone file.

  • NS records denote the Authoritative nameserver for a given domain. Generally speaking, we have two NS records defined per domain. If the zone file does not contain NS records, then the domain name system does not consider the response of the DNS server to be authoritative.
Typical contents of a Zone file
  • CNAME — Canonical Name is an alias (other names) for your domain. It redirects anything defined in the name property of the CNAME record to the specified value. You can use it to redirect the subdomains to the domain name.
  • * is a catch-all alias. *.testmydomain.com can mean ww.testmydomain.com, wwww.testmydomain.com, any.testmydomain.com, store.mydomain.com, etc.
  • @ is a special case and means if people type testmydomain.com instead of full www.testmydomain.com they will still get directed to your domain.

I hope you find this article helpful and stay tuned for my next blog post.

Until then!

Happy Learning 😎

References :

[1] https://blog.logrocket.com/how-to-build-web-app-with-multiple-subdomains-nginx/#technical-requirements

--

--

Deepak Singh

Sales Eng., Consultant, Solutions Architect, Analyst, Hobbyist Coder. 2 Masters — MBA Georgia Tech, MS Analytics. Interested in technology, business & strategy