UP | HOME
RSS | Source | License

Note About Domain and DNS

Table of Contents

1 What Is DNS

DNS routing translates a domain name (example.com) to an IP address (18.28.0.35).

2 Domain Hierarchy

DNS%20domain%20name%20classification.png

Top to bottom:

  1. 13 root servers
  2. (TLD) Top Level Domain (.com .co .moe .edu .org)
  3. Second level domains (casouri psu nintendo)
  4. sub domains (blog archive)

For example, in following domain,

archive.casouri.co.uk

co.uk is the Top Level Domain, casouri is the secondary domain (which I bought from gandi.net), archive is the sub domain (which I can create as many as I want).

Most of the Top Level Domains isn't made of two separate parts like co.uk, I have no idea why British made their country TLD like that.

2.1 Side Note: dot in the end of a domain

You might have seen domains with a dot in the end:

archive.casouri.co.uk.

This not only is a valid domain, but also a better (more concise) format than the one without the dot in the end. The ending dot is like the root directory /, it marks the root of the domain. And a domain with that dot in the end is considered absolute, just like an absolute path.

Similarly, a domain without an ending dot is considered relative. So I can totally add something after it like archive.casouri.co.uk.what.is.this.com, just like what I can do to a relative path.

3 Some Terminology

3.1 Resource Record (RR)

DNS resource records are basically mapping files that tell the DNS server which IP address each domain is associated with.

Here are the most commonly used types of DNS records:

A record
An A record maps a domain name (e.g., www.example.com) to an IP address and usually starts with www.
CNAME record
A Canonical Name (CNAME) is a type of record in the DNS that is used to specify that a domain name is an alias for another domain or sub domain. I used a CNAME record to link archive.casouri.co.uk. to casouri.github.io.
MX record
A mail exchanger (MX) record refers to a resource record (RR) that routes traffic to an email server. More on https://en.wikipedia.org/wiki/MX_record.
TXT record
A text record (TXT record) is a type of resource record in the DNS that lets you associate plain text with a domain.

3.2 DNS Zone

A DNS zone represents a range of IP addresses in a domain name space.

3.3 Domain Register

A domain provider, or domain name registrar, is a company or organization that manages the assignment of domain names. For me it's gandi.net.

3.4 Name server

The server that translates domains into IP addresses.

3.5 Zone file

A text file describes mapping between domain and IP.

Written by Yuan Fu <casouri@gmail.com>

First Published on 2018-09-11 Tue 00:00

Last modified on 2018-11-11 Sun 19:22