URL structure explained: every part of a web address
Every link you click is a small instruction set. The scheme says how to talk to the server, the host names where it lives, and the path plus query tell it what to return. Understanding the parts turns confusing links into readable sentences.
Reading a URL from left to right
In https://example.com/blog/post-1?page=2#comments, the scheme https sets a secure connection. The host example.com names the server. /blog/post-1 is the path on that server, ?page=2 is the query, holding extra parameters, and #comments is the fragment, which the browser uses to scroll and never sends to the server.
Each piece has a job, and URLs mix them freely: sites hide hashes for client-side navigation, APIs encode state in the query string, and redirects often rewrite only the path segment.
- Scheme — https, http: the protocol.
- Host — the server name and optional port.
- Path — the resource location on the server.
- Query — parameters after the ?.
- Fragment — the # part, browser-only.
Why encoding matters
Several characters — spaces, #, ?, & — have special meaning inside a URL. To pass one of them as data, it must be percent-encoded, so a space becomes %20 and a # becomes %23. Broken encoding produces links that point elsewhere or fail entirely.
Keep the slug readable for SEO while encoding inside paths and queries properly — the two goals do not conflict when you use the right tool for each step.
Inspect and build URLs with FreetoolsY
The URL Parser splits any address into its exact parts using the same parsing rules browsers use, which is great for debugging redirects or reading query parameters. Pair it with the URL Encoder to safely prepare values, and the Slug Generator to create clean paths for content.