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 is an address for a resource. In this HTTP(S) example, it has a scheme, a host, a path, an optional query and an optional fragment. Reading those parts separately makes a long address easier to understand. URI syntax
Try it
Choose a part of the example address. Compare its job with the request shown below. No address is opened and no network request is made.
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
In practice
When checking a link, ask which job you intended to change. A different host points at a different authority. A different path or query changes the requested identifier. A fragment such as #pricing identifies a secondary resource or part of a representation and is separated before dereferencing. It is not sent as part of this HTTP request target. Fragment semantics
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
Sources & model boundaries
Primary references used for this explanation. The interactive example is our own implementation.
- 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 .