This page demonstrates the difference between # (a fragment delimiter, never
sent to the server) and %23 (a percent-encoded literal hash character that
is part of the path or query string sent to the server). They look similar in a
URL but are entirely different things.
-
Fragment link:
#real-anchor— browser scrolls to the section below; server only sees a request for/percent-encoded-hash. -
Encoded-hash link:
/percent-encoded-hash%23real-anchor— server receives a request for the path/percent-encoded-hash%23real-anchor(a different URL entirely), which returns 404. A crawler that strips%23as if it were a fragment delimiter would incorrectly record a 200 instead. -
Query param with
%23:/query-page/?ref=%23section— the%23decodes to a literal#in the query value, not a fragment. The server receivesref=#sectionas a query parameter.
Real anchor section
Reachable via the fragment #real-anchor. Always present in the HTML —
the hash only scrolls here and is never sent to the server.