The Domain Name System (DNS) is the internet's address book. It converts a readable domain like nairohost.site into the numeric IP address a server uses, so you do not have to memorise numbers to reach a website.
How a DNS Lookup Works
When you visit a domain, your computer performs a series of queries:
- The browser asks a recursive resolver (usually your ISP) for the domain's IP address.
- The resolver checks its cache. If the answer is not stored, it queries the root nameservers.
- The root servers point it to the correct top-level domain (TLD) servers, such as those handling .com or .co.ke.
- The TLD servers return the authoritative nameservers for the domain.
- The authoritative nameservers respond with the final record, and the site loads.
The Key Components
- Resolver: caches and forwards your queries.
- Authoritative nameservers: hold the real records for a domain (for NairoHost these are ns1.nairohost.site and ns2.nairohost.site).
- Zone file: the collection of records for one domain.
- Records: individual entries such as A, MX, CNAME, and TXT.
Why DNS Matters for Your Website
Without correct DNS, visitors cannot reach your site even if the hosting works perfectly. Your domain's nameservers must point to the provider that hosts the zone file, and that zone must contain accurate records. If you host with NairoHost, you manage these records in the cPanel Zone Editor.
DNS changes are not instant because answers are cached at each layer. This delay is called propagation and is governed by a value called TTL, covered in a separate article. Understanding the lookup chain helps you reason about why a new site or email setup may take time to work everywhere.