#setup
- What the browser does
- Scrolls to the element with
id="setup"
A URL fragment is the part after #. It is handled by the browser, not sent to the server. What that means for canonicals, JavaScript routing, and crawlable links.
A URL fragment is the final part of a URL, starting with #. It points to a spot inside a resource, such as a heading or a video timestamp, and is handled by the browser after the page loads, not sent in the request. Google advises against loading different content by fragment and against using one as a canonical URL.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
#setupid="setup"#t=10,20 (media fragment)#:~:text=fragmenthttps://www.example.com/path/guide?lang=en#setup
scheme host path query fragmentMDN says the fragment is handled entirely by the client and isn't included in the request, and RFC 3986 describes it being split off before the URI is dereferenced. The server never sees it, so two URLs that differ only after the # fetch the same response.
Google's JavaScript SEO guide warns against loading different content based on the fragment, because Googlebot can't reliably resolve those URLs. Its section is titled "Use the History API instead of fragments."
Google's consolidation guide says not to specify a fragment as the canonical URL, because Google generally doesn't support fragments.
Google can only discover links that are a elements with an href attribute, so clickable elements without one don't help discovery.
// Link: <a href="/products">Products</a>
link.addEventListener('click', (event) => {
event.preventDefault();
loadView('/products');
history.pushState({}, '', '/products');
});curl -s https://developer.mozilla.org/en-US/ | wc -c
curl -s 'https://developer.mozilla.org/en-US/#anything' | wc -c # curl drops the fragment, so the byte count matchesOpen the site, click through the main navigation, and watch the address bar. If views change only after a #, they're fragment-routed.
Open a fragment-routed view's source. If the content isn't in the initial HTML, the view depends on JavaScript, so see JavaScript SEO.
Search your rel=canonical values for #. Any hit is a canonical Google generally won't support.
1 questions people ask next, answered from the sources on this page.
Google's documentation says it generally doesn't support fragments as canonical URLs and can't reliably resolve content that depends on them. Because the server receives the same request, treat fragment variants as one URL.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.