# Anatomy of a URL

> Take any URL apart: scheme, host, port, path, query and fragment, origins, percent-encoding, relative links, redirects and lookalike hosts.

Canonical: https://codelivly.com/rooms/anatomy-of-a-url
Last updated: 2026-11-15

| | |
|---|---|
| Level | Beginner |
| Category | Web |
| Lessons | 6 |
| Estimated time | 3 h 25 min |
| XP | 150 |

A URL is seven parts, and each part is read by different software. This room cuts real links from the Fernhill Outdoors support inbox into those parts and shows what each one controls: which machine is contacted, what the server receives, and what never leaves the browser. You learn what an origin is and why browsers fence pages by it, how paths and query strings are split, how percent-encoding works byte by byte, and how relative links and redirects are resolved. The room ends with a guided lab in which you sort a file of customer links into real, broken and lookalike, and write up the findings.

## Lessons

1. The Parts of a URL and What Each One Controls (30 min)
2. Scheme, Host and Port: What Makes an Origin (30 min)
3. Paths, Query Strings and Fragments (30 min)
4. Percent-Encoding and Characters That Need Escaping (35 min)
5. Relative URLs, Redirect Targets and Lookalike Links (35 min)
6. Guided Lab: Take Apart the Links in a Support Inbox (45 min)

## Related

- [Learning path: Web Fundamentals](https://codelivly.com/learning-paths/web-fundamentals)
- [All rooms](https://codelivly.com/rooms)
