How to Fix Broken Internal Links That Return 4xx Errors

Broken internal links point from one page on your site to another URL on the same site that returns a 4xx status: usually 404 Not Found, but also 410 Gone, 403 Forbidden or 401 Unauthorized. By the end of this guide you will have a list of every broken target, the pages linking to it, a fix for each one, and a clean re-crawl as proof.

By Updated ⏱ 30-60 minutes🎯 Beginner● High impactTechnical
Illustration: Broken internal links (4xx) fix guide
TECHNICAL · FIX GUIDE Broken internal links (4xx) IMPACTEFFORT TIME30-60 minutes LEVELBeginner

Why it matters

Every broken internal link wastes crawl budget and cuts off the link equity that would have flowed to a real page. Users who click it hit a dead end and often leave. Search engines and AI crawlers that follow your links to discover and cite content can't reach what isn't there.

A single broken link in a header, footer or sidebar repeats on every page, so one template bug can put hundreds of pages in the failing group. Our audit fails the check once more than 2% of crawled pages contain at least one link to an internal 4xx URL.

✕BeforeThe footer on all 240 pages links tohttps://example.com/about-us, whichreturns 404 because the page was✓AfterThe footer links straight tohttps://example.com/about (200 OK),and /about-us 301-redirects to /about

What you need

A site crawler such as Screaming Frog SEO Spider (free up to 500 URLs), Sitebulb, or the free W3C Link Checker
Edit access to your CMS, theme templates and navigation menus
Access to redirect settings (CMS redirect manager, .htaccess, Nginx config or CDN rules)
A spreadsheet to track each broken URL and its fix

Step-by-step fix

1

Crawl the site and export every internal 4xx URL

Run a full crawl of your site starting from the homepage. In Screaming Frog, open Response Codes, set the filter to Internal and then Client Error (4xx). Then go to Bulk Export > Response Codes > Internal > Client Error (4xx) Inlinks.

This export lists each broken target in the Destination column, every page linking to it in the Source column, and the anchor text. It covers 404, 410, 403, 401 and other 4xx codes, and our audit counts all of them.

Pro tip: Crawl the exact origin your visitors use, for example https://www.example.com. Links that use a different host, such as http:// or a non-www variant, are a separate issue. Standardise them to the canonical origin while you are editing.
2

Group broken links by where they appear

Sort the export by Destination and count the Source pages for each one. If a broken URL is linked from almost every page, the link sits in a shared template: header, footer, sidebar, breadcrumb or related-posts widget. Fix template links first, because one edit clears hundreds of pages.

Next come links inside body content, which you fix page by page.

  • Many sources, same anchor text: template or menu link
  • One or a few sources: link in body content
Pro tip: Add a column called 'Fix' with one of three values: update, restore, or remove. This keeps decisions consistent if several people share the work.
3

Decide the right fix for each broken URL

For each Destination, check whether the content still exists somewhere else. Search your CMS, or run site:example.com keyword in Google.

  • Moved or renamed: point the link at the new URL.
  • Typo in the link: correct it. Watch for wrong case (/Pricing vs /pricing), missing or extra trailing slashes, and stray characters such as %20.
  • Deleted by mistake: restore the page.
  • Intentionally removed, no replacement: delete the link or replace it with the closest relevant page.
  • 403/401 (login or member areas): remove these links from public pages, or make the URL return a 200 login page or a 302 to the login form.
text
curl -sI https://example.com/about-us | head -n 1
# HTTP/2 404
curl -sI https://example.com/about | head -n 1
# HTTP/2 200
Pro tip: If URLs return 403 to your crawler but load fine in a browser, your firewall or bot protection is blocking it. Allowlist the crawler's user agent or IP and re-test before you edit any links.
4

Update the links at the source

Edit the menu, template or page content so each href points directly at the final, working URL. Do not rely on redirects for internal links. A link that passes through a redirect still costs an extra hop, while a direct link does not.

In the template, use root-relative or absolute URLs on your canonical origin. /pricing`, which break when a page moves to a different folder depth.

html
<!-- Before -->
<a href="/about-us">About Example Co</a>
<a href="pricing">Pricing</a>

<!-- After -->
<a href="/about">About Example Co</a>
<a href="/pricing">Pricing</a>
Pro tip: For links repeated across many posts, use a search-and-replace tool on the database instead of editing posts one by one. Back up the database first.
5

Add 301 redirects for URLs that moved

Once the internal links are fixed, add a 301 redirect from each old URL that moved to its new location. This catches bookmarks, external backlinks and cached search results. Redirect only to a genuinely equivalent page.

Do not redirect everything to the homepage, because Google treats that as a soft 404. For pages permanently removed with no replacement, a 410 is acceptable, as long as no internal links point to them.

nginx
# Nginx (inside the server block)
location = /about-us { return 301 /about; }

# Apache (.htaccess)
Redirect 301 /about-us /about
Pro tip: Keep redirects in a single list. Check that no redirect points to another redirect or to a 404, because chains and dead-end redirects create new problems.
6

Clear caches and re-crawl to confirm

Purge your CMS cache, page-cache plugin and CDN so the updated HTML is served. Re-run the same crawl and open Response Codes > Internal > Client Error (4xx) again. The list should be empty, or contain only URLs that nothing links to any more.

Any remaining Source pages show exactly which links you missed.

Pro tip: Schedule a monthly crawl, or a crawl after every major content or URL change, so new broken links are caught within weeks instead of months.

Platform-specific notes

WordPress

Edit menus under **Appearance > Menus**, or **Appearance > Editor > Navigation** on block themes. For redirects, install the Redirection plugin (**Tools > Redirection**) or use the redirect manager in Rank Math or Yoast Premium. To bulk-replace old URLs in post content, use Better Search Replace (**Tools > Better Search Replace**), and run a dry run first. When you change a post slug, WordPress may guess-redirect the old slug, but don't rely on it.

Shopify

Menus are under **Content > Menus** (older admins: **Online Store > Navigation**). When you edit a product, collection or page handle, tick **Create a URL redirect** to keep the old URL working. Manage redirects by searching 'URL redirects' in the admin. Broken links are often hard-coded in theme sections or in product descriptions, so check both.

Wix

Use **SEO > URL Redirect Manager** (under Marketing & SEO / SEO Tools) to add 301s. Wix offers to create a redirect when you change a page URL, so accept that prompt. Links inside text boxes and buttons have to be updated in the Editor through each element's link settings.

Webflow

Add redirects in **Site settings > Publishing > 301 redirects**. Webflow flags some broken links in the Designer, but links to deleted CMS items or static URLs typed by hand are not always caught. After fixing, re-publish the site so the changes go live.

Next.js / Cloudflare

In Next.js, define permanent redirects in `redirects()` in next.config.js (`permanent: true` sends a 308, which search engines treat like a 301). Use `<Link href>` with paths that match your actual routes. On Cloudflare, large redirect lists belong in **Rules > Redirect Rules** or **Bulk Redirects**. Cloudflare WAF or Bot Fight Mode can also return 403 to crawlers, which looks like a broken link.

Check that it worked

✅ How to verify

  • Re-crawl with Screaming Frog or Sitebulb and confirm the Internal > Client Error (4xx) report is empty.
  • Spot-check the top fixed links with `curl -sI https://example.com/path` and confirm each returns 200 directly, not 301 or 404.
  • In Google Search Console, check **Indexing > Pages > Not found (404)**. Open the referring pages for each URL and confirm none are on your own site. The report updates over days to weeks.
  • Re-run our audit and confirm the check reports no broken internal links, or that fewer than 2% of pages contain one.

⚠️ Common mistakes

  • Adding a redirect but leaving the old internal link in place, so every click and crawl still takes an extra hop.
  • Redirecting every missing page to the homepage, which Google treats as a soft 404 and users find confusing.
  • Fixing body content but missing the broken link in the footer, mega-menu or related-posts widget that appears site-wide.
  • Forgetting to purge page and CDN caches, so the crawler still sees the old HTML with broken links.

Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.

Check my site free

FAQ

Do broken internal links hurt SEO?

Yes, indirectly. They waste crawl budget, stop link equity from reaching real pages and frustrate users. A few on a large site won't cause a penalty, but site-wide broken links in templates signal poor maintenance and can slow discovery of new content.

Should I fix a broken link or redirect the 404 page?

Do both when the page moved. Update the internal link to the new URL so it resolves directly, then add a 301 from the old URL to catch external links and bookmarks. If the page is gone with no replacement, remove the link and let the URL return 404 or 410.

Why does a page show as 403 in my crawler but load in my browser?

Your firewall, CDN bot protection or security plugin is blocking the crawler's user agent or IP. Allowlist the crawler and re-test. If real search-engine bots are also blocked, that is a more serious problem to fix.

How often should I check for broken internal links?

Monthly for most sites, and always after a redesign, migration, URL structure change or bulk content deletion, since these cause most broken links.