Quick answer
A URL path is the portion after the host and before a query or fragment. It often uses slash-separated segments, such as /learn/images/.
Original example
Two sections of one sample site
In https://example.com/learn/ the path is /learn/. In https://example.com/tools/url-explorer/ the path is /tools/url-explorer/. Both addresses use the same hostname but identify different locations.
Path segments
Hierarchical URL paths commonly contain segments separated by forward slashes. A question mark starts the query and a number sign starts the fragment, so neither belongs to the path.
The native URL parser may normalize dot segments such as /a/../b to /b.
Common misunderstandings
- A path is not a local file-system guarantee; a server decides how to interpret it.
- The query and fragment are separate URL components.
Related answers
Sources
- URI path - MDN Web Docs, accessed 2026-10-30
This is an unreviewed preview draft. Corrections can be sent after the owner configures a verified contact address.