## What is DNS?
DNS (Domain Name System) is the phonebook of the internet. It translates human-readable domain names (like howtohub.bd) into IP addresses (like 144.79.249.187) that computers use to identify each other.
## How DNS Works: Step by Step
1. You type howtohub.bd in your browser
2. Browser checks local DNS cache
3. Recursive resolver (your ISP or 8.8.8.8) receives the query
4. Root nameserver directs to .bd TLD server
5. TLD nameserver directs to the authoritative nameserver
6. Authoritative nameserver returns the A record (IP address)
7. Browser connects to the IP and loads the website
## Types of DNS Records
– **A Record** – Maps domain to IPv4 address
– **AAAA Record** – Maps domain to IPv6 address
– **CNAME** – Alias one domain to another
– **MX Record** – Mail exchange server
– **TXT Record** – Text records for verification (SPF, DKIM)
– **NS Record** – Authoritative nameservers
## Using dig for DNS Lookups
“`
# Basic A record lookup
dig howtohub.bd
# Short output
dig +short howtohub.bd
# Specific record type
dig howtohub.bd MX
# Query specific DNS server
dig @8.8.8.8 howtohub.bd
“`
## Using nslookup
“`
nslookup howtohub.bd
nslookup -type=MX howtohub.bd
“`
## DNS Caching
DNS records have a TTL (Time To Live) value. Common TTL values range from 300 seconds (5 minutes) to 86400 seconds (24 hours).
## Common DNS Issues
– Propagation delay – DNS changes take time to propagate globally
– Wrong TTL – Too long TTL delays updates
– Missing records – No A record for www subdomain
– DNSSEC mismatch – Signature validation fails
## Conclusion
Understanding DNS is fundamental for anyone working with web technologies. It is the invisible infrastructure that makes the internet work.