How to Find and Fix Broken Links and Redirect Chains

Find broken internal links, soft 404s and redirect chains, then fix them with copy-paste Apache and Nginx rules that send users and Googlebot in one hop.

By the MakeItFlow team Updated 8 min read
Share LinkedIn X Facebook WhatsApp
How to Find and Fix Broken Links and Redirect Chains

Broken links and redirect chains pile up quietly. Every redesign, slug change, deleted product and http-to-https move leaves a few behind. Individually they're small. Together they waste crawl activity, slow visitors down and leak the value of links pointing at your site. This guide shows how to find them, which ones actually matter, and how to fix them with server rules you can copy.

Key takeaways

  • Fix broken internal links at the source page, and 301 deleted URLs that have backlinks or traffic to the closest relevant page.
  • Random 404s that nobody links to can be ignored, because Google says they do not count against the rest of your site.
  • Point every old redirect straight at the final URL, as Google recommends redirecting directly to the final destination.
  • Do not redirect every 404 to the homepage, since Google commonly treats mass homepage redirects as soft 404s.
Watch the explainer
AI Automation for Real Estate & Letting Agents, Explained Step by Step · 3:29 Subscribe

What counts as a problem

Issue What it looks like Why it matters
Broken internal link Your page links to a URL on your own site that returns 404/410 Dead end for users. Crawl effort wasted. Lost internal link value.
Broken external link You link out to a page that no longer exists Bad experience, looks neglected
Broken backlink target Another site links to a URL of yours that now 404s Lost value from an external link
Redirect chain URL A → B → C → final page Each hop adds latency. Signals can weaken. Long chains may not be followed.
Redirect loop A → B → A Page never loads. Browser shows "too many redirects."
Soft 404 A "not found" or empty page that returns 200 Google flags it as a soft 404, and it wastes crawl budget
Internal link to a redirect Your menu links to /old-page, which 301s to /new-page Avoidable hop on every click and crawl

Do 404s hurt SEO?

Not in the way people fear. Google's position, from its 2011 post "Do 404 errors hurt my site?", is that 404s on some URLs don't count against the rest of your site. 404 is the correct response for content that doesn't exist. What matters is:

  • 404s you link to yourself. These are broken internal links, and you should fix them.
  • 404s on URLs that have backlinks or traffic. Redirect these to the closest relevant page.
  • Pages you meant to keep that now 404 by accident. Restore them.

Random 404s from typos or scraped URLs that nobody links to can be ignored.

How Google handles redirects

  • Google's crawlers follow up to 10 redirect hops by default. Beyond that, the URL is treated as an error.
  • 301 and 308 are permanent. Google treats the target as the canonical.
  • 302, 303 and 307 are temporary. The source URL usually stays in search results.
  • An instant meta refresh (0 seconds) is treated as permanent, and a delayed one as temporary. JavaScript redirects are a last resort, because rendering can fail.
  • In its site-move guide, Google recommends redirecting directly to the final destination. If a chain can't be avoided, keep it short, ideally no more than 3 hops and fewer than 5. The guide also recommends keeping redirects "generally at least 1 year."

Every hop also costs visitors time: an extra round trip, and often a new connection if the host changes. A chain like http://example.com → https://example.com → https://www.example.com → https://www.example.com/ adds three round trips before the page even starts loading, which directly worsens Time to First Byte.

1. Trace a single URL from the command line

curl -sIL http://example.com/old-page | grep -iE "^(HTTP|location)"

Output for a chained redirect:

HTTP/1.1 301 Moved Permanently
Location: https://example.com/old-page
HTTP/2 301
location: https://www.example.com/old-page
HTTP/2 301
location: https://www.example.com/new-page/
HTTP/2 200

That's three hops. It should be one.

2. Crawl the site

A crawler follows every internal link and reports the status code of each target. Export:

  • Internal links returning 4xx or 5xx, along with the source page that contains each one
  • Internal links that return 3xx, with their final destination
  • Redirect chains (2+ hops) and loops

Fix the source pages. That's where the problem actually lives.

3. Search Console

  • Page indexing report > Not found (404). Indexed or known URLs that now 404. Click a URL and use URL Inspection to see where Google found links to it.
  • Page indexing > Soft 404. Pages returning 200 that look like errors.
  • Page indexing > Page with redirect. Normal for old URLs. A concern if it includes URLs from your sitemap or main navigation.
  • Links report > Top linked pages (external). Cross-check it against your 404 list to find valuable backlinks pointing at dead URLs.

4. Server logs

Logs show real 404s hit by users and bots, including Googlebot. Sort by hit count. A 404 hit thousands of times a month deserves a redirect.

Decide for each broken URL:

  1. Content moved? 301 to the new URL.
  2. Content deleted, but a close replacement exists? 301 to the replacement, such as the parent category for a discontinued product.
  3. Content gone, no equivalent? Return 404 or 410, and remove or update every internal link to it.
  4. Link has a typo? Fix the link at the source.

Don't redirect every 404 to the homepage. Google commonly treats mass homepage redirects as soft 404s, and they confuse visitors. Redirect only to genuinely relevant pages.

For external links that have died, update them to the new location, link to an archived copy, or remove the link.

A helpful 404 page

Your 404 page must return a real 404 status, not 200, and should help people continue: a search box, links to main sections, and a way to report the problem.

error_page 404 /404.html;
location = /404.html {
    internal;
}
ErrorDocument 404 /404.html

Fixing redirect chains

Collapse the canonical host redirects into one hop

The most common chain is protocol plus host plus trailing slash, each handled by a separate rule. Combine them.

Nginx:

# Any http request, or https on the bare domain, goes straight to https://www
server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://www.example.com$request_uri;
}

server {
    listen 443 ssl;
    server_name example.com;
    # ssl_certificate ... (needs a cert covering the bare domain)
    return 301 https://www.example.com$request_uri;
}

Apache (.htaccess):

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

Behind a load balancer or CDN that terminates TLS, %{HTTPS} may always be off. Check X-Forwarded-Proto instead, or set the redirect at the CDN. If you use HSTS, the browser handles http-to-https internally after the first visit. See HSTS explained.

Update old redirect rules to point at the final URL

After several redesigns, a redirect map often looks like this:

/services.html   -> /services/
/services/       -> /what-we-do/
/what-we-do/     -> /services/web-design/

Rewrite every old entry to point directly at the current URL:

Redirect 301 /services.html https://www.example.com/services/web-design/
Redirect 301 /services/     https://www.example.com/services/web-design/
Redirect 301 /what-we-do/   https://www.example.com/services/web-design/

Then paste the old URLs into our bulk redirect checker to confirm each one now reaches its destination in a single hop.

On WordPress, the Redirection plugin and SEO plugins' redirect managers list existing rules. Search them for targets that are themselves redirected.

Update internal links to the final URL

Redirects are a safety net for external links and bookmarks. Your own links should never need them. Search your database or templates for old URLs and replace them. On WordPress, a search-and-replace tool like WP-CLI does it in one command:

wp search-replace 'https://example.com/what-we-do/' 'https://www.example.com/services/web-design/' --dry-run

Remove --dry-run once the preview looks right. Back up the database first.

Also update canonical tags, hreflang annotations and XML sitemap entries that point at redirected URLs. See canonical tags explained and the XML sitemap guide.

Break redirect loops

Loops usually come from two systems disagreeing, such as a CMS forcing non-www while the server forces www, or a CDN set to "Flexible" SSL while the origin redirects to https. Trace the loop with curl -sIL and remove one of the conflicting rules.

Frequently asked questions

Should I use a 404 or a 410 for deleted pages?

Google says all 4xx errors except 429 are treated the same way: the URL is dropped from the index and crawled less over time. A 410 is a slightly clearer "gone for good" signal to other systems, but either is fine for Google. What matters is not returning 200 on a page that says "not found."

How many redirects in a chain is too many?

Google follows up to 10 hops, but recommends redirecting straight to the final destination, and keeping any unavoidable chain short, ideally three hops or fewer. For users, every hop adds a round trip, so aim for one.

How long should I keep 301 redirects?

Google's site-move guidance says generally at least one year, and keeping them indefinitely is fine. Redirects for URLs with backlinks should stay permanently, because those links will keep sending visitors and signals.

Do redirects lose PageRank?

Google has said permanent redirects are a strong canonicalization signal and pass signals to the target. Chains aren't a penalty, but they add latency and increase the risk that a hop breaks or isn't followed. Keep redirects one hop.

What to do next

Run curl -sIL on the four versions of your homepage (http and https, with and without www). Each should reach the final URL in at most one hop. Then crawl the site and fix every internal link that returns a 404 or passes through a redirect. Run a free audit to check a sample of internal links for broken ones in seconds. Scheduled monitoring on paid plans re-scans weekly or daily so new broken links don't go unnoticed.

Sources

#broken links #redirects #404 errors #technical seo

Free checklist (PDF)

Free estate & letting agents website checklist

28 practical checks for estate & letting agents: website speed and mobile, Google Business Profile and reviews, email security, booking and enquiry handling, and AI search visibility. Each one says why it matters, and many link to a free tool that checks it.

We email you the PDF and nothing else unless you tick the box. See the privacy policy.

Written by the MakeItFlow team

We build the website audit these guides are based on. Every fact is checked against the primary sources listed above and this guide was last reviewed on 30 October 2026 . How we research and check

Share LinkedIn X Facebook WhatsApp

Check your own site in 30 seconds

Run a free audit covering speed, SEO, DNS, email authentication and security headers — and get a prioritised fix list.

Weekly newsletter

One practical website fix, every week

New guides on speed, SEO, email deliverability and security — straight to your inbox. No spam, unsubscribe in one click.

Keep reading