Course outline · 0% complete

0/27 lessons0%

Course overview →

URLs, domains, and DNS

lesson 7-3 · ~10 min · 24/27

The address on every request

Every request from lesson 7-1 needs an address saying which server to ask and what to ask it for. That address is the URL (uniform resource locator), the text in your browser's address bar. Engineers read URLs constantly — in bug reports, in logs, in links that mysteriously 404 — so knowing the parts pays off immediately.

Take https://hackuniversity.dev/courses:

  • https:// is the scheme: which set of communication rules to use. HTTPS is the web's standard, the S meaning the traffic is encrypted so others on the network cannot read it
  • hackuniversity.dev is the domain name: which server to contact, as a human-readable name
  • /courses is the path: which page or resource on that server you want

One catch: the internet's machinery does not deliver to names. Each machine is reached by a numeric IP address (like 76.76.21.21) — the network's real house numbers. Names exist because humans are bad at memorizing numbers, so a lookup system called DNS (domain name system) translates a domain name into its current IP address. Before your browser can send the request, it quietly asks DNS "what number is hackuniversity.dev?" and then connects to that number.

https://hackuniversity.dev/coursesschemedomain → DNS → IP addresspathone URL: how to talk, whom to ask, what to ask for
A URL in three parts: the scheme picks the rules, the domain (translated by DNS to an IP address) picks the server, the path picks the resource.

Quiz

In https://hackuniversity.dev/dashboard, which part tells the server WHICH page you want?

Code exercise · python

A pretend DNS lookup, using lesson 4-2's if/else. The Input box contains hackuniversity.dev. Run it, then try another domain in the Input box.

Problem

What is the name of the system that translates a human-readable domain name like hackuniversity.dev into a numeric IP address? (Three letters is fine.)