concept Frontend & browsers
URL structure
Read a web address, one part at a time. Learn what reaches the server—and why the fragment is different.
What it means
A URL identifies a resource through a scheme and a structured reference. In an ordinary HTTPS navigation, its authority selects the destination, its path and query identify what to request, and its fragment is interpreted by the client rather than sent in the HTTP request target. A URL is an identifier, not proof that the resource exists or is safe. URI syntax HTTP/1.1 target
Try it
Example — inspect a URL without opening it. Choose a URL preset, then select a component. The highlighted text, explanation and HTTP/1.1 request example change together; Reset restores the original URL and Host selection.
Start with the original example and select Fragment. The browser representation contains #pricing, while the request target remains /guides/hosting?plan=starter. Next choose the non-default port preset: the hostname is still example.com, but the Host field is example.com:8443. A port is part of the authority, not part of the path. URL components HTTP request target
| Local preset | Origin-form target | Host field | Fragment shown separately |
|---|---|---|---|
| Original example | /guides/hosting?plan=starter | example.com | pricing |
| Plain path | /a | example.com | None |
| Non-default port | /a | example.com:8443 | b |
Selecting a component that is absent produces an explicit “not present” explanation; it does not invent an empty query parameter or an anchor. The presets deliberately contain no credentials or personal tokens. The browser's URL parser supplies normalization, so its displayed result need not preserve every spelling choice from an input string. This is a component explorer, not a DNS, connection or link-safety test. Browser URL API
One address, different jobs
The scheme, https, identifies the scheme used to access the resource. The host, example.com, identifies the host; it is not the complete URL. The path, /guides/hosting, identifies a resource within that host's space. It need not name a physical file. A query, here ?plan=starter, carries additional identifying data. Its interpretation belongs to the receiving application. URI syntax
The browser's URL API exposes these components separately. Our example uses that parser, so a supplied address is represented in its normalized form. A port can be explicit; the API's host property includes a non-default port, while hostname does not. Credentials and non-HTTP schemes are outside this explorer. URL API
What the server receives
For an ordinary HTTP/1.1 request sent directly to an origin, the request target contains the path and query. The host is supplied separately. That is why the example shows these two lines, not the whole address:
GET /guides/hosting?plan=starter HTTP/1.1
Host: example.comThis is a simplified HTTP/1.1 illustration, not a wire capture or a statement that every HTTP version uses this text format. Proxies and special request methods have other request-target forms. HTTP request target
Change the fragment, not the request
Compare https://example.com/help?topic=dns#examples with the same URL ending in #definitions. Under the ordinary HTTP/1.1 origin-form model, both use GET /help?topic=dns and Host: example.com; only the client-side fragment differs. Replacing ?topic=dns with ?topic=tls changes the request target instead. That distinction matters when debugging logs: a server access log that lacks the fragment is not necessarily missing data it should have received. A script in the page may still read the fragment and transmit it separately, so an anchor is not a secret-storage location. URL syntax URL API
In practice
When comparing two links, separate the host (and explicit port), path, query and fragment before testing. If an unexpected page loads, inspect the resolved and normalized URL as well as the HTTP request; do not infer a server-side redirect merely because the fragment changed. Avoid copying links with tokens into tickets or screenshots. The explorer parses a local example—it does not fetch the address or check the destination.
Common misunderstanding
“Not in the request target” does not mean “secret.” Page code can read a URL's fragment and could send its value in a separate request. Do not place credentials in example URLs. The explorer uses a fixed example rather than asking for one of your private links. Browser URL representation
Key takeaways
Locate the boundary that actually changed. Path/query differences may alter the resource requested from an origin; fragment differences usually alter the client-side view. Record the normalized request target and host separately, and keep all URL components free of sensitive credentials.
Frequently asked questions
Editorial questions, answered from the sources listed for this article.
Does a fragment stay secret from the website?
No. It is excluded from the ordinary HTTP request target, but code running in the page can read the browser URL, including its fragment. Do not put secrets in a URL component.
Is a hostname the same as the Host field?
Not always. In an HTTP/1.1 request, the Host field can include a non-default port, such as example.com:8443. The hostname itself does not include that port.
Can a query parameter affect the response?
Yes. The query is part of the target identifier and an application may interpret it to select content or behavior. The syntax does not prescribe what a specific parameter means.
Why does the browser remove the default port?
URL parsing and serialization can normalize a scheme’s default port. Compare the parsed `hostname`, `host` and `port` properties instead of treating character-for-character spelling as a transport trace.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- RFC 3986 — URI generic syntax
Sections 3.1–3.5. Component boundaries, authority and fragment processing.
Checked .
- WHATWG URL Standard
URL API and URL representation. Browser URL parsing, normalization and component access.
Checked .
- RFC 9112 — HTTP/1.1
Sections 3.2 and 3.2.1. Origin-form request target and the separate Host field.
Checked .