A URL fragment (also called a fragment identifier or hash) is the part of a URL after the "#" symbol. For example, in "https://example.com/page#section2," "#section2" is the fragment. The browser uses it to automatically scroll to the element with a matching id attribute.
A critical characteristic of fragments is that they are never sent to the server. When a browser accesses "https://example.com/page#section2," the request sent to the server is just "https://example.com/page" - the "#section2" part is processed entirely on the client side.
This behavior affects URL shortening services. If a shortened URL includes a fragment (e.g., https://miji.be/abc#section2), the shortening service's server cannot receive the fragment portion, so it may not carry over to the redirect destination. When shortening a URL that contains a fragment, verify beforehand whether the service preserves it correctly.
In SPAs (Single Page Applications), fragments are sometimes used for routing. URLs like "https://app.example.com/#/dashboard" and "https://app.example.com/#/settings" use hash routing to manage page state via fragments. However, path-based routing using the History API (/dashboard, /settings) is now the mainstream approach.
From an SEO perspective, Google ignores fragments when indexing pages. This means "/page" and "/page#section2" are treated as the same page. If you want a specific section to appear independently in search results, designing it as a separate URL (subpage) rather than a fragment is more effective. You can find related books on Amazon.