// SEO plans from €35/hour or €395/month// from €35/hr · €395/mo Free SEO checker[email protected]+31 6 4555 9353
Free SEO audit
technical seo

How to Fix Broken Links on Your Website

A broken link points to a page that does not exist or cannot be reached. Google uses links to discover pages and understand them, so broken and uncrawlable links waste that value and frustrate readers. This guide covers finding broken links, deciding the right fix for each, and writing links Google can follow.

  • Find broken links
  • Choose the fix
  • Crawlable link format
  • Prevent new ones
linkcrawlable
<a href="/page/">anchor</a>   ok
<span onclick=...>           not ok
// quick answer
Crawl your site to list links returning 404 or errors, then for each one: update the link to a working URL, redirect the old URL if a close replacement exists, or remove the link if there is none. Make sure links use standard a elements with an href, because Google generally follows only those. Every page you care about should be linked from at least one other page.

Why broken links matter

Google uses links to judge how relevant a page is and to discover new pages to crawl. A link to a missing page gives readers a dead end and gives crawlers nothing to follow (the second part is my own reasoning). See fix 404 errors.

What a crawlable link looks like

FormatGoogle’s guidance
a element with hrefRecommended; absolute, root-relative or relative paths all work
onclick or class attributesDo not prevent crawling when href is present
JavaScript-inserted anchorsCrawlable with standard anchor markup
span with href, routerLink, onclick-onlyNot recommended; Google may still try to parse
javascript: pseudo-URLsDiscouraged
<a href="/fix-404-errors/">fix 404 errors</a>

The href must resolve to a real web address that crawlers can request. Check JavaScript-built links with URL Inspection and JavaScript SEO basics.

Find broken links

crawlerRun a site crawler and filter for 4xx and 5xx responses (my own method)
search consoleCheck Page indexing for Not found (404) URLs (report)
linksReview the Links report for pages that others link to
analyticsLook for 404 landing pages (my own method)

Choose the fix

SituationFix (my own guidance)
Typo in the linkCorrect the URL
Page movedUpdate link and add a permanent redirect
Page removed, close replacementRedirect to the replacement
Page removed, noneRemove the link; let the URL return 404 or 410
External page goneReplace or remove the link

See 301 vs 302 and redirect chains. Avoid redirecting everything to the home page; it can look like a soft 404 (guide).

Write good anchor text

  • Be descriptive and concise; avoid click here and read more.
  • Test the anchor in isolation: it should make sense alone.
  • Do not stuff keywords; Google says that violates its spam policies.
  • Empty links give no signal; image links use the alt text.
  • Link every page you care about from at least one other page.

See anchor text and internal linking.

Fix broken links step by step

1
crawl

Crawl the site

Export 4xx and 5xx links.

crawl
2
sort

Sort by source page

Fix important pages first.

priority
3
decide

Pick the fix

Update, redirect or remove.

fix
4
apply

Apply changes

Edit links or add redirects.

apply
5
verify

Recrawl

Confirm 200 responses.

verify
6
schedule

Repeat monthly

Links break over time.

schedule

External links

Google says linking to other sites, such as citing sources, can build trust, and nofollow is for sources you do not trust, not for every external link. Paid links should be marked sponsored or nofollow, and user-generated links ugc or nofollow. See nofollow, sponsored and UGC links.

Notes for WordPress sites

  • Slug changes: editing a slug breaks old links; add a redirect (guide).
  • Deleted posts: check internal links before trashing a post.
  • Page builders: buttons built with onclick need a real href.
  • Plugins: broken link plugins can slow a site; a periodic crawl is lighter (my own view).

Troubleshooting

SymptomLikely cause (my own diagnosis)Action
Link works for users but not crawledNo hrefUse a standard anchor
404s after redesignURL structure changedRedirect old URLs
External 404sSource removedReplace or remove
Soft 404 after mass redirectIrrelevant targetsRedirect to relevant pages

Checklist

Format

  • a with href
  • Real URLs
  • No javascript: links
  • Descriptive anchors

Audit

  • Crawl for 4xx
  • Check Search Console
  • Review external links
  • Note sources

Fix

  • Correct typos
  • Redirect moved pages
  • Remove dead links
  • Avoid home redirects

Maintain

  • Monthly crawl
  • Redirect on slug change
  • Link new pages
  • No orphan pages

What Google’s page does not say

The crawlable links page gives no limit on the number of links per page, no numeric weighting of anchor text or links, no crawl frequency details, and no rendering or indexing details for JavaScript beyond recommending URL Inspection. The audit tools and fix decisions here are my own practice.

Key terms

Broken link
Link to an unreachable page.
Anchor text
Visible text of a link.
Orphan page
Page with no internal links.
Redirect
Sends a URL to another.

Common mistakes

mistake 1

Buttons without href

Not crawlable.

Use anchors.
mistake 2

Redirecting all to home

Looks like soft 404.

Redirect to relevant pages.
mistake 3

Generic anchors

Little signal.

Be descriptive.
mistake 4

Ignoring external links

Rot over time.

Recheck periodically.
mistake 5

Changing slugs freely

Creates 404s.

Redirect old slugs.
mistake 6

One-time audit

Links keep breaking.

Schedule checks.

Related guides

faq

Broken link questions

Do broken links hurt SEO?

They waste discovery and frustrate users; Google gives no penalty rule on the page I used.

What links does Google follow?

Generally a elements with an href attribute.

Can onclick links work?

Not reliably; Google may still try but it is not recommended.

Should I redirect or remove?

Redirect when a close replacement exists, otherwise remove the link.

How often should I check?

Monthly is a sensible routine (my own suggestion).

Do image links count?

Google uses the alt text as anchor text.

Is there a link limit per page?

Google gives no ideal number.

Should external links be nofollow?

Only for sources you do not trust, paid or user-generated links.

sources

Link format, anchor text and internal and external link guidance come from Google’s page. Finding methods, fix decisions, WordPress notes and checklists are my own.

Scroll to Top