The Anatomy of a URL
URLs look like a jumble of slashes and question marks, but every character has a job. Once you can read the structure, tracking links, API calls and broken pages all start to make sense. Let's dissect a full one:
https://user:pass@www.example.com:8443/path/page?q=hello&lang=en#section-3
Scheme (protocol)
https is the scheme — it tells the browser howto talk to the server. On the web it's almost always https (encrypted) or, on old sites, http. Other schemes exist too: mailto:, ftp: and tel:.
Userinfo
The user:pass@part is optional credentials embedded in the URL. You rarely see it today — putting a password in a URL is insecure because URLs get logged and cached — but it's still valid syntax and worth recognising.
Host and port
www.example.comis the host: the human-readable address that DNS resolves to a server's IP. The optional :8443 is the port — the specific door on that server. Browsers assume 443 for https and 80 for http, so you normally never type a port.
Path
/path/pageis the path, identifying the specific resource on the server — like a file path in a folder tree. Modern apps often map paths to routes rather than real files, but the mental model of “drilling into folders” still holds.
Query string
Everything after the ? is the query string: a list of key=value pairs joined by &. It passes extra data to the server — a search term, a page number, a language. In our example, q=hello and lang=en. This is also where tracking parameterslive, which we'll come back to.
Because query values can contain spaces and symbols, they're percent-encoded — a space becomes %20 or +. That's why hello world shows up as hello+world. See URL encoding explained for the full story.
Fragment
The #section-3 at the end is the fragment. It points to a spot within the page and never reaches the server — the browser handles it, usually by scrolling to a matching element. Single-page apps sometimes hijack the fragment for client-side routing.
Reading tracking links
Marketing links stuff the query string with UTM tags like utm_source and utm_campaign, plus click IDs like fbclid and gclid. They don't change the page — they tell analytics where you came from. If you build campaigns, the UTM builder assembles these correctly, and what are UTM parameters explains each one.
See it broken down
The fastest way to understand any link is to take it apart. Paste one into the URL parser and it labels every component and decodes each query parameter — turning that intimidating string into a tidy, readable table.