Technical SEO

    How to Fix 404 Errors and Broken Links Without Damaging SEO

    A practical workflow for finding, prioritising and fixing 404 errors, soft 404s, broken internal links and migration-related dead URLs — including when a 404 is the correct answer.

    Published July 26, 202612 min readBy Mazam Khalid
    On this page

    A 404 is not automatically a problem. It is the correct HTTP answer for a URL that does not exist. The problems are 404s on URLs that still carry value, dead internal links that waste crawl budget, and soft 404s that confuse Google about what your site contains. This guide separates the three and gives you a fix path for each.

    Find every dead URL from all five sources

    Any single tool gives you a partial picture. Combine:

    1. Search Console → Page indexing → Not found (404) — URLs Google is still requesting.
    2. A full site crawl (Screaming Frog, Sitebulb) — broken internal links and images, with the source page for each.
    3. Server access logs — the ground truth for what is actually being requested, including URLs no crawler will discover.
    4. Analytics — pageviews landing on the 404 template, which reveals dead URLs with real traffic.
    5. Backlink data — external links pointing at URLs you deleted; these are the highest-value fixes.
    Log files beat crawlers for prioritisation. They tell you request frequency. A 404 hit 4,000 times a month deserves attention before one hit twice.

    Prioritise before you fix

    PrioritySignalAction
    Critical404 with external backlinks or organic traffic301 to the closest equivalent page
    High404 linked internally from indexed pagesFix the source link, then redirect if needed
    Medium404 present in the XML sitemapRemove from sitemap; restore or redirect
    LowOld URL, no links, no trafficLeave as 404, or 410 if deliberately removed
    IgnoreSpam-crafted or scanner-probing URLsNothing — do not redirect them

    Redirecting an internal link is a patch, not a fix. Every internal 301 adds latency and dilutes the click. Update the link in the content, menu, template or database instead. Common sources on CMS-driven sites:

    • Hard-coded absolute URLs in page content after a domain or protocol change.
    • Menu items pointing at deleted pages.
    • Widgets and footers referencing legacy paths.
    • Old CDN or media paths after a storage migration.

    On WordPress, a database search-and-replace (with serialisation handled correctly) is the fastest route. Never run a raw UPDATE against serialised post meta without a serialisation-aware tool — it corrupts the field.

    Redirect rules that hold up over time

    • Use 301 for permanent moves; reserve 302 for genuinely temporary situations.
    • Redirect to the closest topical equivalent. If none exists, the category or parent page is better than the homepage.
    • Keep chains to one hop. After several migrations, A→B→C→D chains are common; flatten them so every legacy URL points directly at the final destination.
    • Match with patterns where the structure is regular, one-to-one where it is not. Regex rules that accidentally catch new URLs cause silent traffic loss.
    • Preserve query strings only when they are meaningful to the destination.
    # Nginx: single-hop redirect for a retired blog path
    location ^~ /old-blog/ {
        return 301 https://example.com/blog/$1;
    }
    
    # Apache: one-to-one mapping
    RewriteRule ^services/old-service/?$ /services/new-service/ [R=301,L]

    Soft 404s: the silent version of the problem

    A soft 404 returns HTTP 200 while showing "nothing found". Google detects the mismatch and excludes the URL, and because the status is 200 nothing appears in your error monitoring. Frequent causes:

    • Search results or filtered listing pages that return zero items.
    • Expired jobs, events or property listings left online with an empty body.
    • Out-of-stock product pages stripped down to a heading.
    • A custom 404 template accidentally serving 200 instead of 404.

    Verify with curl -I, not your browser. Then either restore meaningful content (related products, alternative listings), or return a real 404/410.

    Check your 404 template's status code after every theme or framework change. A template refactor that turns 404s into 200s can put thousands of empty URLs into the crawl queue before anyone notices.

    The biggest 404 spikes come from migrations, and they follow a predictable pattern: the redirect map covered pages in the CMS but missed images, PDFs, feeds, paginated URLs, parameter variants, and old language paths. Before you launch, crawl the live site and export every URL that returns 200 — including assets — and test the redirect map against that full list, not against the sitemap. The complete process is in the migration SEO checklist.

    Make the 404 page do useful work

    Visitors will still hit it. A good 404 page returns the correct status code, keeps the site header and navigation, offers search, and links to your main sections. Skip clever illustrations that delay the useful content.

    Monitoring so it does not come back

    1. Schedule a monthly crawl and alert on new internal 404s.
    2. Watch the Not found count in Search Console at pattern level, not URL level.
    3. Log 404 requests with their referrer so you can tell internal from external causes.
    4. Review the redirect map twice a year and remove rules for URLs that no longer receive requests.

    Put this into practice

    Move from diagnosis to implementation with a focused engagement for your stack.

    Technical SEO Services

    Frequently asked questions

    Do 404 errors hurt rankings?
    A 404 on a URL nobody links to or visits is harmless — it is the correct response for something that does not exist. What damages performance is 404s on URLs that hold links, receive traffic, or are linked internally from important pages.
    Should I redirect every 404 to the homepage?
    No. Bulk homepage redirects are usually treated as soft 404s and they give visitors a dead end. Redirect to the closest equivalent page, or return a genuine 404/410 with a helpful page.
    When should I use 410 instead of 404?
    Use 410 Gone when you deliberately removed content and it will never return — expired listings, discontinued products with no replacement. Crawlers drop 410 URLs faster.

    Drowning in crawl errors?

    Large sites accumulate dead URLs faster than anyone can fix them by hand. I map them by pattern, build the redirect logic, and cut the error count down to the ones that actually matter.

    Mazam Khalid — Technical SEO & AI Search Specialist

    Mazam Khalid works across technical SEO, Google Search Console, indexing and crawl optimization, AI Search Optimization, GEO/AEO, structured data, Core Web Vitals, WordPress, Shopify, Laravel, React and website performance. He also works on Google Ads, Meta Ads, analytics and conversion tracking where technical implementation affects search visibility and lead generation.

    Chat on WhatsApp