All systems operational

What is a URL fragment?

A fragment identifier is the part of a URL after the # sign. It points to a place within a page, such as a section or an element, and is handled by the browser rather than sent to the server.
A link to a section of a page:
https://example.com/guide/redirects#permanent-vs-temporary
                                    └── fragment
Behaviour

What the fragment does.

Scrolls to an element

The browser looks for an element with that id and scrolls to it.

Not sent to the server

The request doesn't include it, so servers and logs never see it.

Doesn't reload the page

Changing only the fragment doesn't fetch a new page, which is why single-page apps use it.

Survives redirects

Browsers carry the fragment over to the redirect target.

Not in analytics by default

Because it isn't sent, tools that read server logs don't count it.

Text fragments

A #:~:text= fragment highlights a phrase in the page.

FAQ

Common questions

Is the fragment part of the query string? +

No. The query string comes before it. A # ends the query string and starts the fragment.

Do search engines treat fragments as different pages? +

Generally no. Two URLs that differ only by fragment are treated as the same page.

Can I link to specific text? +

Yes, with a text fragment such as #:~:text=phrase, which browsers highlight and scroll to.

Are fragments preserved in UTM links? +

Yes, but put UTM parameters before the #, otherwise they are ignored.