Utilumo
LightDarkSystem
Explainer1 min readUpdated June 25, 2026

The anatomy of a URL

Short answer

A URL is built from a scheme (https), a host (example.com), an optional port, a path (/products/42), an optional query string (?ref=home), and an optional fragment (#reviews). Each part tells the browser something different about where to go and what to request.

A labelled example

https://shop.example.com:443/products/42?ref=home#reviews
\___/   \_____________/ \_/ \__________/ \______/ \_____/
scheme       host       port    path       query   fragment
One URL, broken into its parts

What each part does

  • scheme — the protocol, usually https, which tells the browser how to connect
  • host — the domain name (or IP) of the server
  • port — which port to connect to; defaults are 443 for https and 80 for http, so it is usually omitted
  • path — which resource on the server to request
  • query — extra parameters after ?, written as key=value pairs joined by &
  • fragment — the part after #, used by the browser to jump to a section; it is not sent to the server
The fragment stays in the browserEverything after # is handled by the browser, not the server. That is why in-page anchors like #reviews do not trigger a new request.
Try it: URL ParserPaste a URL to see its scheme, host, path, port, and decoded query parameters.Open tool

References

Questions

What is the query string in a URL?

It is the part after the question mark, made of key=value pairs joined by ampersands, such as ?ref=home&page=2. Servers use it to receive parameters like search terms or filters.

Is the part after the # sent to the server?

No. The fragment after # is used by the browser to scroll to a section or drive client-side routing. It is never sent in the HTTP request.

Does the URL parser send my link anywhere?

No. The URL is parsed locally in your browser and is never uploaded.

Keep reading