DNS
The Domain Name System protocol acts like a phonebook for the Internet by translating human-friendly domain names into IP addresses, being a critical part of how the Internet functions. It operates in the Application layer usually on UDP port 53
For example, when users enter a domain name in their browser such as google.com, the DNS queries multiple servers to resolve the name into the corresponding IP address 8.8.8.8 related to this domain. It's also possible that various IP addresses are related to the same domain name.
Domain Types
Authoritative Nameserver: Hold authority for a particular zone, only answer queries from their area of responsibility, and their information is binding. If an authoritative name server cannot answer a client's query, the root name server takes over at that point
Non-authoritative Nameserver: Not responsible for a particular DNS zone, they collect information on specific DNS zones themselves, which is done using recursive or iterative DNS querying
Caching DNS Server: Cache information from other name servers for a specified period. The authoritative name server determines the duration of this storage
Forwarding Server: Forward DNS queries to another DNS server
Resolver: Non-authoritative DNS server that performs name resolution locally in a computer or router
Domain Hierarchy
The Domain Hierarchy organizes domain names on the Internet. It is structured like an inverted tree with multiple levels, where each level represents a domain, and the entire system is organized from the most general to the most specific. Each part of a domain name corresponds to a level in this hierarchy.
Root Level
The top level of the DNS Hierarchy
Represented as a dot invisible
.
hidden in domainsIs managed by root name servers that direct queries to the appropriate TLD servers
There are just 13 root servers in the world
Top-Level Domain (TLD)
Is the righthand part of a domain name
They can only be composed of a-z, 0-9, and hyphens, and can't start or end with hyphens or have consecutive hyphens
Can be classified into two types:
gTLD: Generic Top-Level Domain, tell the user the domain name's purpose, for example, the .edu domain for sites related to education
ccTLD: Country Code Top-Level Domain, used for geographical purposes, for example, the .uk for the sites from the United Kingdom
Second-Level Domain (SLD)
Is the most typical part of the domain which specifies the name of the page
Consist of a maximum of 63 characters
They are registered by individuals or organizations through domain registrars
Subdomain
Are optional and normally describe the specific application of a page
Can use multiple subdomains but the length must be kept to 253 characters or less
There is no limit to the number of subdomains you can create for a domain name
Record Types
The records are entries in a DNS server that map domain names to IP addresses and other information. They have some types that define specific classes of information stored about a domain name, each one serving a different purpose. Here are the most common DNS record types:
A Record (Address): Resolve to IPv4 addresses
AAAA Record (IPv6 Address): Resolve to IPv6 addresses
CNAME Record (Canonical Name): Resolve to another domain name, then the DNS request redirects to the second domain to work out the IP address
MX Record (Mail Exchange): Resolve to the address of the servers that handle the email for the domain you are querying. Includes a priority flag that tells the client which mail server should be contacted first
NS Record (Name Server): Indicates the authoritative DNS servers for a domain
TXT Record (Text): Stores human-readable or machine-readable text. Commonly used for security. Help to list servers that have the authority to send an email on behalf of the domain. Can be used to verify ownership of the domain name when signing up for third-party services
PTR Record: Applies reverse lookup to convert IP addresses into valid domain names
SOA Record (Text): Provides information about the corresponding DNS zone and email address of the administrative contact
Last updated
Was this helpful?