URL Anatomy
Definition
A URL breaks into named components, each with a job of its own. The scheme comes first, usually https, and decides the protocol. Then the host, something like acme-pitch.99helpers.site, which names the machine to ask; the leftmost label is the subdomain and the rest is the registered domain. After the host comes the path, the slash-separated route to a particular file, such as /docs/plan.pdf. A question mark starts the query string, a set of key-value pairs; a hash starts the fragment, which never leaves the browser. Ports, and occasionally credentials, can appear too, but they are rare in a link you would share.
Why It Matters
Most link failures are a single component gone wrong, and naming the component tells you where to look. A link that loads the page but records nothing has lost its query string, usually to a shortener or a chat client. A link that jumps nowhere has a fragment that no longer matches anything in the document. A link that fails for everyone except you has the wrong host, typically a staging subdomain nobody else can reach. A file that will not open at all often has a path with a space or an accent in it that needs URL encoding.
How It Works
The browser parses the address before it sends anything at all. It reads the scheme to pick the protocol and default port, resolves the host through DNS to an IP address, and opens a TLS connection when the scheme is https. It then sends a request whose first line carries the path and query together — GET /docs/plan.pdf?src=email HTTP/1.1 — followed by a Host header naming the host, which is how one server can answer for many sites. The fragment is deliberately left out of that request: the browser keeps it and applies it once the document has arrived. Characters outside a safe set are percent-encoded on the way, which is why a space travels as %20.
Real-World Example
A researcher shares the address coastal-survey.99helpers.site/report.pdf?src=newsletter#methods. The scheme is https, the host is coastal-survey.99helpers.site, the path is /report.pdf, the query records that the visit came from the newsletter, and the fragment jumps to the methods section. When a colleague reports that the link opens at the top of the document instead, only one component can be at fault. Everything else demonstrably worked, because the file appeared.
Common Mistakes
- ✕Confusing the path with the query — adding a page parameter to a static host does nothing, because no application is there to read it
- ✕Assuming the fragment reaches the server — it does not, so server-side analytics never see it and it can never be used for access control
- ✕Reading a domain from the left-hand end — the part that decides where you are going is the registered domain at the right, which is how deceptive addresses work
Related Terms
Query String
A query string is the part of a URL after the question mark, carrying key-value pairs such as src=newsletter and page=2. It passes small pieces of data along with the request.
URL Fragment
A URL fragment is the part after the hash, such as a section name or a page number. It tells the browser where to scroll or what to show, and it is never sent to the server.
URL Encoding
URL encoding replaces characters that are unsafe or reserved in a web address with a percent sign and two hex digits, so a space becomes %20. It is why a filename with spaces or accents can break a link.
Permalink
A permalink is an address meant never to change, so that everything pointing at it keeps working. The permanence is a promise from whoever owns the address, not a property of the web.
Subdomain
A subdomain is a label placed in front of a domain you already control, such as docs.acme.com or acme-pitch.99helpers.site. It is a separate address that can point somewhere completely different from its parent.
Put a file online in seconds
Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.
Host a file free →