Back to Blog
Technical SEO

How to Fix 404 Errors: Step-by-Step Guide

Step-by-step instructions to find, fix, and prevent 404 errors — audits, redirects, link fixes, and monitoring for technical SEO.

June 2, 2026
12 min read
Share:
DevOps engineer inspecting a server rack while addressing 404 errors

404 errors hurt user experience and search visibility. This article explains how to fix 404 errors with a practical workflow you can run this week: discover every missing URL, categorize each one, implement the right redirect or restore, update links and sitemaps, improve the 404 user experience, and set ongoing monitoring. By following these steps you'll reduce lost traffic and stop search engines from indexing dead pages.

TL;DR:

  • Run a site-wide audit and server log parse to extract every missing URL and referring page; aim to export URL, status code, referring internal URL, inbound referrer, and last-crawled timestamp.

  • Use a decision matrix: restore content for pages with traffic/backlinks, 301 redirect when there's a clear replacement, use 410 for intentionally removed content; prioritize fixes with >100 organic sessions or >3 referring domains.

  • Automate daily alerts for high-severity 404s (>10 visits and 404 status), add a helpful custom 404 page with search and suggested links, and include 404 checks in deploy checklists.

Step 1: Audit Your Site to Discover Every 404 Error (how to Fix 404 Errors)

Prerequisites — Tools and Access You Need

You’ll need account access and a small toolset:

  • Google Search Console access to the Coverage and URL Inspection reports.

  • Server access or raw access to server logs (Apache, Nginx).

  • A crawler like Screaming Frog or Sitebulb for a site crawl.

  • A way to run curl or an HTTP inspector (curl, HTTPie, browser devtools).

  • If you use a platform for audits, run your monthly scan (SEOTakeoff’s site audit feature can surface 404s at scale when you run scheduled scans).

Run Crawls and Use Server Logs

Crawling and logs produce different but complementary lists:

  • Start a full crawl with Screaming Frog or Sitebulb to find internal links pointing to 404s and soft 404s. Export at minimum: URL, status code, source/internal referring URL, and anchor text.

  • Parse server logs for any 4xx responses. Server logs show real user and bot traffic that crawlers can't see (e.g., external referrers and non-HTML requests).

  • Combine results into a master spreadsheet with columns: URL, status code, referring internal URL, inbound external referrer, last-modified/last-crawled, and last-seen timestamp.

Aim for actionable fields: URL, status code, referring internal URL, inbound referrer, and last-modified header. That set makes prioritization and fixes straightforward.

Use Google Search Console and External Crawlers

Search Console’s Coverage report lists discovered 404s and their discovery date; URL Inspection shows Google’s last crawl and response. Use both to detect soft 404s — where the server returns 200 but the page content says "not found." Soft 404s can be spotted in Search Console and with a quick curl check:

  • Command: curl -I your website property

  • Expect: HTTP/1.1 404 Not Found (not 200)

For small local site patterns (many location pages), check tooling advice in our guide to AI tools for local SEO. For small-business examples of common 404 sources, see veterinary site examples. For broader troubleshooting workflows and checklists, see our hub: see our guides.

Step 2: Categorize Each 404 and Choose the Right Fix

Create a simple decision matrix for each URL:

  • Restore content: If the URL previously drove organic traffic, conversions, or has important backlinks.

  • 301 redirect: If there’s a clear replacement page that matches user intent.

  • Update internal links: If only internal navigation or menus point to the URL (site refactor).

  • 410 status: If content was intentionally removed with no replacement and should be deindexed.

  • Leave (and monitor): Low-traffic, unlinked pages with no value.

Example mapping:

  • /old-product-123 → /new-product-123 (301)

  • /outdated-blog-post → restore updated version (restore)

  • /typo-page → update internal linking to correct slug (update link)

Special Cases: Removed Products, Expired Content, Typos, External Referrals

Ecommerce and SaaS sites see specific situations:

  • Discontinued products: Redirect to the category page if many visitors come from search; restore if the product page is valuable for SEO. See ecommerce examples in ecommerce page examples.

  • Versioned docs: For docs replaced by a new version, prefer a 301 to the current version or use a canonical tag if multiple similar pages exist.

  • Typos: If only the referrer has a typo, update the referring page. If external sites link with a typo, consider a 301 if the typo URL receives traffic.

  • External referrals: Record inbound external referrers and prioritize outreach for high-value backlinks.

Score each URL on a simple 0–10 scale using:

  • Organic sessions last 90 days (higher weight).

  • Number of referring domains.

  • Conversion value (sales, signups, leads).

  • Crawl frequency by Google.

Illustrative rule:

  • High priority = >100 organic sessions in 90 days OR >3 referring domains → Fix within 48–72 hours.

  • Medium priority = 10–100 sessions OR 1–3 referring domains → Fix within 2 weeks.

  • Low priority = <10 sessions and no referring domains → Schedule for regular cleanup.

When deciding whether to restore content or replace it, consult content strategy resources like scale content production and the SaaS-specific considerations in SEO for SaaS.

Step 3: Implement Redirects and Correct HTTP Responses (embed Video)

Server-level Redirects (apache, Nginx) — Best Practices

Prefer server-level rules for site-wide or bulk redirects:

  • Apache (modrewrite or RedirectMatch) is ideal for many redirects managed in one place.

  • Nginx rewrite rules are faster for high-traffic sites.

Best practices:

  • Use 301 for permanent moves and 410 when removing content intentionally.

  • Avoid redirect chains and loops; redirect directly to the final target.

  • Keep redirects topical — redirecting a product page to the homepage risks being treated as a soft 404 by Google.

Conceptual examples (do not paste into prod without testing):

  • Apache (concept): Redirect 301 /old-product-123 /new-product-123

  • Nginx (concept): rewrite ^/old-product-123$ /new-product-123 permanent;

Cms-level Redirects and When to Use Them

CMS plugins (WordPress redirect plugins, platform redirect UIs) are easy for marketers and useful for one-off fixes. They’re slower than server-level redirects but fine for small volumes. Use CMS-level redirects when:

  • You lack server access.

  • You need a quick temporary redirect during content publishing.

SEOTakeoff’s CMS publishing can push replacement content and helps repoint internal links after redirects. Use internal linking automation to repoint contextual links after implementing redirects to avoid broken anchor chains.

When to Use 301 vs 302 vs 410 and Canonical Tags

  • 301 Redirect: Permanent move; transfer ranking signals over time.

  • 302 Redirect: Temporary; use if the change is transient (A/B tests, time-limited promos).

  • 410 Gone: Tells crawlers the resource is intentionally removed—use when you want deindexing faster.

  • Rel=canonical: Use when similar content exists and you want to consolidate duplicates without redirecting.

Test redirects with:

  • Curl -I your website property

  • Expect: HTTP/1.1 301 Moved Permanently and a Location header pointing to the final URL.

Watch this step-by-step guide on fixing 404 errors for SEO: redirects, 410 codes in wordpress:

.

For background on HTTP 404 semantics and causes, see the MDN explanation of 404 Not Found.

For tools and integrations that help QA redirects and avoid common automation mistakes, see the guide on what actually works.

Run a focused crawl to list internal backlinks to your 404 URLs. Export the referring pages and sort by traffic to prioritize:

  • Fix top referrers first (sitewide menus, popular blog posts).

  • If a page has high rankings, update its anchor text to point to the replacement or corrected URL.

If your team uses AI to scale content, follow the internal linking guidance in AI SEO best practices.

Sitewide links create many hits on a broken URL. Search for:

  • Menu and footer links with old slugs.

  • Category templates that index removed content.

  • Old internal links in high-traffic posts.

Examples of anchor text updates:

  • Old anchor: “product specs” → New anchor: “current product specs”

  • Preserve topical relevance when changing anchors; don’t point a product link at an unrelated category page.

Large sites benefit from bulk replaces pushed via CMS automation; SEOTakeoff’s internal linking feature can repoint contextual links at scale and publish updates directly to WordPress/CMS, reducing manual tasks.

Regenerate and Submit XML Sitemaps

After mass changes:

  • Regenerate your XML sitemap to include new URLs and remove dead ones.

  • Submit the updated sitemap in Google Search Console.

  • For mass redirects, wait a few days and then check Search Console Coverage to ensure Google is indexing the replacement pages.

For examples of how structured content and navigation prevent accidental 404s, see site architecture tips and agent site structure.

Step 5: Improve User Experience on Remaining 404 Pages

Design a Helpful Custom 404 Page

A good custom 404 page converts a dead-end into recovery:

  • Clear headline that states the page is missing.

  • Short explanation and apology line.

  • Prominent search box and suggested destinations.

  • Links to top categories, pillar pages, and contact/reporting options.

Use the US Web Design System template for structure guidance: see the 404 page template.

Copy examples:

  • Headline: “Page not found”

  • Body: “We couldn’t find that page. Try searching or explore these popular sections.”

Add Search, Suggested Pages, and Contact Paths

Rank recommended elements by usefulness:

  • Search box (most useful): Let users try another query immediately.

  • Suggested articles or top categories: Offer 3–6 links that match likely intent.

  • Contact/report form: Short form to report broken links; include a single optional field for the missing URL.

  • Home and sitemap links: Backup navigation paths.

For retail sites, suggest category pages to recover shopping intent; see the “category page strategy” example at category page strategy. For local businesses, review local UX approaches in local SEO examples.

Use Analytics to Measure Hit Behavior on 404s

Track behavior on 404 pages:

  • Events: search use, suggested link clicks, contact form submissions.

  • Metrics: bounce rate from 404s vs average page, successful next-click rate (session continues to another page).

  • Sample alert rule: any URL with >10 visits and 404 status triggers a high-priority ticket.

Ensure your 404 returns the correct status (404 or 410), not a 200; a 200 with “not found” content confuses search engines and may be treated as a soft 404.

Step 6: Monitor, Test, and Prevent Future 404s

Set Up Ongoing Monitoring and Alerts

Create monitoring rules:

  • Daily automated alerts for high-severity 404s (e.g., any 404 with >10 visits).

  • Weekly summaries for lower-volume 404s.

  • Integrate server log parsing into your monitoring stack to catch non-HTML failures.

Suggested tooling: Search Console alarms, server log parsers, scheduled crawls, uptime monitors, and your CMS redirect report. SEOTakeoff’s site audit and automated scanning can surface new 404s as part of scheduled checks and feed into internal-link automation to reduce human errors during publishing.

Include 404 Checks in Deploy Checklists

Add these items to every release checklist:

  • Run a link checker against staging to catch new broken links.

  • Validate redirects in staging or a QA environment.

  • Confirm that any removed URLs are handled with a redirect or 410.

  • Post-deploy, run a short crawl of the updated sections.

For context on automated publishing risks, see auto-publishing risks and further reading on publishing risks. For a discussion about what parts of SEO can be automated, see automation limits. For migration checklists that prevent 404s, consult education site migration.

Schedule Periodic Audits and Report to Stakeholders

Recommend cadence:

  • Monthly full site audit for most SMBs.

  • Weekly crawl for fast-changing sections (product inventory, docs).

  • Quarterly backlink review to find external links pointing to broken pages.

Report actionable metrics to stakeholders: number of high-priority 404s fixed, traffic recovered, and backlinks rescued. A simple SLA example: fix high-priority 404s within 72 hours; medium within 2 weeks.

The Bottom Line

How to fix 404 errors is a repeatable process: audit comprehensively, choose the right remediation (restore, 301, 410, or update), and close the loop by fixing internal links and monitoring. Prioritize pages with traffic or backlinks, automate alerts for new high-severity 404s, and use an audit + deploy checklist to prevent regressions.

Frequently Asked Questions

Why does Google keep showing a URL as a 404 after I fixed it?

Google may show a URL as 404 in Search Console until it re-crawls the URL and processes the change. Troubleshooting steps: verify the live server response with curl -I (expect 200 or 301 depending on your fix), clear any CDN cache, and use Search Console's URL Inspection to request indexing. If you implemented a 301, confirm the final Location header and check for redirect chains; if you set a 410, Google may take a few days to remove the page from the index.

Also check server logs to confirm Googlebot hits and timestamps. If you see Google requesting the URL but still reporting 404, verify intermediate caches (CDN, reverse proxies) and any staging vs production mismatch.

How do I fix redirect chains and loops?

Find chains with a crawler (Screaming Frog, Sitebulb) or by checking server logs. A redirect chain looks like URL A → URL B → URL C. The fix is to update A to redirect directly to C with a single 301 and remove intermediate redirects. For loops, identify the looped set and choose the correct final URL, then update server or CMS rules to break the loop. After changes, re-test with curl -I to confirm a single 301 with Location pointing to the final destination.

Prevent recurrence by keeping a redirect map and using server-level rules for bulk redirects where possible; CMS plugins are fine for one-offs but can create complexity at scale.

When should I use a 410 vs a 301 redirect?

Use a 301 redirect when the content has a clear replacement and you want ranking signals transferred. Use a 410 when content was intentionally removed and you do not plan to replace it; 410 can lead to faster deindexing. For temporary removals (short promotions, testing), use a 302. Always consider user intent: if users expect similar content, prefer a 301 to a relevant page rather than a 410.

What if an external site links to a broken URL?

First, record the referring domain and prioritize by domain authority and traffic. If the broken link is high value, reach out to the site owner with a short outreach message asking them to update the link to the correct URL. If outreach isn’t possible or slow, implement a 301 from the broken URL to the correct target so the referral traffic and link equity isn’t lost. Keep outreach templates concise and include the correct target URL.

how to fix 404 errors

Ready to Scale Your Content?

SEOTakeoff generates SEO-optimized articles just like this one—automatically.

Start Your Free Trial