Glossary · Internet & Web

URL Fragment (Hash)

A URL fragment is the part after the # symbol that points to a section within a page and is handled by the browser, never sent to the server.

Updated October 6, 2026

A URL fragment is the portion of a URL that follows #. It identifies a location inside the document, such as a heading with a matching id, and is processed only by the browser.

Why it matters

Fragments power in-page navigation and table-of-contents links. Single-page applications also use them for client-side routing. Because the server never receives the fragment, it does not appear in access logs and cannot be used for server-side decisions.

A practical tip: when you share a deep link to a section of a long guide, check that the target heading has a stable id, since automatically generated ids can change when a title is edited.

Example

https://example.com/guide#common-mistakes

The browser loads /guide and then scrolls to the element with id="common-mistakes".

Common mistakes

  • Expecting server-side code to read the fragment.
  • Linking to an anchor whose id was renamed, so the link silently lands at the top.
  • Using fragments for content that search engines need to index separately.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.