On this page
What this issue is
An anchor link (also called a jump link or in-page link) ends with a # and a name, for example #contact. When you click it, the browser looks for an element with id="contact" and scrolls to it.
The link is broken when no element has that ID. The browser does not show an error. The page just stays where it is, or the visitor lands at the top. Typical causes are a renamed section, a typo, different capitalisation (IDs are case-sensitive), a section deleted in a redesign, or a block that loads later with JavaScript.
<a href="#plans">See plans</a>
<section id="plans">
<h2>Plans</h2>
</section>Why it costs you leads or sales
Anchor links are often your call to action. A hero button that says "Get a quote" may jump to a form lower down. If the jump fails, the visitor sees nothing happen and may think the page is broken. Some will scroll to find the form, others leave.
The business impact is usually low, because most visitors can still scroll. It grows when the broken link is the main button on a landing page, or when an ad or email links straight to a section such as /offer#signup.
- Landing pageVisitor reads the hero
- Click "Get a quote"href="#quote-form"
- Jump to formNo element has id="quote-form"
- Form submittedVisitor never reaches it
The visitor clicks a button meant to jump to the form. The target ID is missing, so the form is never reached.
Example: illustrative numbers only. A working jump link keeps more visitors moving toward the form than a dead one.
How to check if your site has it
Click every in-page link
On key pages (landing pages, pricing, service pages), click each button and menu item that links to a #section. It should scroll to the right place.
Read the URL after the click
Check the address bar shows the #name you expect. If the page did not move, the target is probably missing.
Search the page for the ID
Open DevTools (F12), go to Elements, press Ctrl+F (Cmd+F on Mac) and search for id="name". No match means the link is broken.
Test in the console
Run the snippet below on the page to list every in-page link with no matching ID.
Test links from other pages and ads
Open URLs like /page#section in a new tab. Also check emails and ads that use them.
[...document.querySelectorAll('a[href^="#"]')]
.map(a => a.getAttribute('href').slice(1))
.filter(id => id && !document.getElementById(id) && !document.getElementsByName(id).length)
.forEach(id => console.log('Missing target:', '#' + id));How to fix it
The fix is always one of two things: add the missing ID to the right element, or change the link so it matches an ID that exists. Pick whichever is less risky. IDs should be lowercase, contain no spaces, and be unique on the page.
Add the ID in the block editor
Select the target block (for example a Group or Heading), open Settings, expand Advanced and type the name in HTML anchor, without the #.
Match the link
In the button or link, set the URL to #name exactly as typed. In page builders such as Elementor, the equivalent field is CSS ID under Advanced.
Find the section's wrapper
In the theme editor, sections often get an ID like shopify-section-template--123__name. Check the real ID with DevTools.
Edit the theme code if needed
Go to Online Store > Themes > Edit code, open the section file and add id="name" to the wrapper element. Then point the link at #name.
Set the element ID
Select the target section, open Element settings (the gear icon) and enter the ID.
Link to the section
On the button, set Link settings to Section, choose the page and pick the section from the list, or use a custom URL of #id.
Set the section ID
In the funnel or website builder, select the section or row, open its settings and set the CSS ID or Element ID (label depends on the builder version).
Update the button link
Set the button action to a URL or scroll option and use #id with the same spelling.
Add an anchor
In the Wix Editor, choose Add Elements > Menu & Anchor > Anchor, place it above the target section and give it a name.
Link to it
Select the button, click the link icon, choose Anchor and pick the page and anchor name.
Use the section ID
In Squarespace 7.1, edit the section, open the pencil/Edit Section panel, and set the Anchor Link (shown in the section settings). Copy the generated #name.
Use it in your link
Paste that #name into your button or navigation link and save.
Check scripts that scroll
If a Custom HTML tag handles the scroll, update the selector it uses to match the real ID. GTM itself does not create anchors.
Add the id attribute
Add id="name" to the target element and make sure it is unique.
Handle sticky headers
If a fixed header covers the target, add scroll-margin-top to the target (see the snippet below).
[id] {
scroll-margin-top: 80px; /* set to your header height */
}How to confirm it's fixed
- Clicking the link scrolls to the intended section.
- The address bar shows the expected #name.
- Opening the full URL with #name in a new tab lands on the section.
- The console snippet reports no missing targets.
- It works on mobile and with the sticky header visible.
- It works after a hard refresh with the cache cleared.
How to prevent it happening again
- Click every in-page link after redesigns, theme updates or section reordering.
- Keep a short list of anchors used in ads, emails and menus.
- Use lowercase IDs with hyphens and no spaces.
- Avoid duplicate IDs on one page.
- Run a crawler or link checker that reports missing fragment targets.
- Check sections that load late with JavaScript, because the ID may not exist when the page first loads.
How FunnelGuard handles this
FunnelGuard does not check for broken anchor links today. It is a possible future check.
What FunnelGuard does do is run your real customer journeys with a robot visitor on a schedule, such as lead forms, checkouts and booking or chat buttons. If a step fails, for example a button that cannot be clicked or a form that cannot be reached, the failure is re-checked from a second region and you get one alert with a screenshot and a likely cause. That can surface a journey broken by a dead jump link, but it is not a dedicated anchor check.
To watch for broken anchors yourself, run the console snippet above after each site change, or use a crawler or accessibility tool that reports missing fragment targets. A free read-only FunnelGuard website audit is also available, and the Free plan covers 1 site and 2 journeys with daily checks, no card needed.
Questions people ask
Why is my anchor link not scrolling to the section?
Most often the element it points to has no matching ID. The link says #plans but the section has id="pricing", or the case differs. Inspect the page, find the section and make the ID and link match exactly.
Are anchor link IDs case-sensitive?
Yes. In HTML, #Contact and #contact are different targets. Use lowercase IDs with hyphens everywhere to avoid mismatches.
How do I find broken anchor links on my website?
Click each in-page link on key pages, or paste a short script in the browser console that lists href values starting with # that have no element with that ID. A site crawler that checks fragments can do this across many pages.
Why does my anchor link go to the top of the page?
The browser could not find the target ID, so it stays at the top. It can also happen when the target is added by JavaScript after the page loads. Make sure the element exists in the page and has the right ID.
Do broken anchor links hurt SEO?
They are not a ranking problem on their own, since search engines generally ignore the part after the #. The harm is user experience: a button that does nothing can lose clicks and leads.
Why does my anchor link scroll but hide the heading under the header?
A fixed or sticky header covers the top of the target. Add scroll-margin-top to the target elements in CSS, set to your header height, so the browser leaves space.
Does FunnelGuard detect broken anchor links?
No. FunnelGuard does not check anchor links yet; it is a possible future check. It does run your real journeys on a schedule, so a journey that cannot complete will be reported, but not as an anchor issue.
Related issues
- PRF-144Broken internal link (404) in the funnelFix guide
- PRF-146Broken link in navigation/footerFix guide
- PRF-147Links to soft-404 pages (200 with 'not found' text)Fix guide
- PRF-145Broken PDF/lead-magnet download linkFix guide
- PRF-138Broken image (404) on a funnel pageFix guide
- PRF-139Broken hero or product imageFix guide