Ravindra BagaleCourses & study guides

Chapter 9: Domain Names, DNS and Subdomains

Mitranno, so far we have opened our websites with http://13.233.10.25. It works, but nobody will remember that number, and you can't put it on a visiting card. In this chapter we give our server a real name like example.com, add www, create subdomains like blog.example.com and api.example.com, and understand what happens behind the scenes when someone types that name. We'll use GoDaddy as the registrar example because many of you already have an account there, but the steps are almost the same on Namecheap, Hostinger, BigRock or Route 53. Chala, apla server la nav deuya (let's give our server a name)!

 You type example.com
        |
        v
 +-------------+  1. "IP of example.com?"  +----------------+   2. root servers
 |  Browser /  | ------------------------> |  DNS resolver  |   3. .com TLD servers
 |  OS cache   | <------------------------ |  (recursive)   |   4. authoritative NS
 +-------------+  6. "13.233.10.25"        +----------------+      (GoDaddy / Route 53)
        |                                          ^
        | 7. HTTP GET  Host: example.com           | 5. A example.com = 13.233.10.25 (+ TTL)
        v                                          |
 +-------------------------------+        +------------------+
 | EC2 (Elastic IP 13.233.10.25) |        | Authoritative NS |
 | Nginx/Apache: server_name     |        +------------------+
 +-------------------------------+

Concepts in this chapter

  1. 9.1What is a domain name?
  2. 9.2How DNS resolution works
  3. 9.3DNS record types you must know
  4. 9.4Before you point a domain: prepare the server
  5. 9.5Buying a domain on GoDaddy
  6. 9.6Pointing a GoDaddy domain to EC2 (GoDaddy DNS)
  7. 9.7Alternative: GoDaddy registrar + Route 53 DNS
  8. 9.8Configure the web server for the domain
  9. 9.9Verify DNS: dig, nslookup and friends
  10. 9.10Subdomains
  11. 9.11HTTPS for your domain and subdomains
  12. 9.12Troubleshooting domains

Review and practice

  1. ★Common Mistakes I See Students Make
  2. ★Interview Questions
  3. ★Practice Questions and Lab Exercises