Technical SEO and site maintenance

404 Errors Best Practices: SEO, UX, and Fixes

A 404 error is appropriate when a requested page does not exist and has no relevant replacement. Keep the true 404, remove links to it, and provide a useful custom error page. Use a 301 redirect when an equivalent page permanently replaces the missing URL, a 302 for a temporary move, and 410 when permanent removal is known. Do not redirect every missing URL to the homepage. Prioritize 404s with internal links, traffic, backlinks, sitemap inclusion, conversions, or repeated requests.

Updated August 11, 2026SEOS.co Editorial Research
404 Errors Best Practices: SEO, UX, and Fixes

TL;DR

Key Takeaways

  • A true 404 is not inherently an SEO problem. Broken internal links, lost backlinks, poor user journeys, and soft 404s are the higher priorities.
  • Use a 301 only when the destination is a genuinely equivalent permanent replacement, not merely a convenient page.
  • Use 410 when permanent removal is known, although 404 remains valid when the server cannot determine permanence.
  • A custom 404 page should help users recover while the server continues returning the HTTP 404 status.
  • Remove 404 URLs from XML sitemaps and update internal links so crawlers and users reach the intended destination directly.
  • Audit server responses as well as rendered content, especially on JavaScript applications, edge-rendered sites, and custom routing systems.
  • Prioritize remediation using business value, internal links, backlinks, traffic, sitemap inclusion, and request frequency.
  • For AI search visibility, preserve stable, indexable destination pages because missing or soft 404 URLs cannot serve as dependable supporting results.

What a 404 error means for users and search engines

404 Not Found is an HTTP client error response. Under RFC 9110, it means the origin server did not find a current representation of the requested resource, or is not willing to disclose that one exists. The status does not reveal whether the condition is temporary or permanent.

Common causes include deleted pages, changed URL structures, mistyped addresses, broken internal or external links, routing failures, and invalid parameter combinations. A normal 404 does not create a sitewide ranking penalty. Search engines need this signal to stop treating unavailable URLs as indexable resources. Google states that 4xx responses other than 429 can cause the affected content to be removed from Search.

The practical harm is usually indirect. A broken internal link interrupts navigation and wastes crawl activity. A missing page with backlinks may lose referral traffic and authority that could have flowed to an equivalent replacement. A URL in an XML sitemap sends a contradictory discovery signal. A high-traffic 404 can also damage trust and conversion performance.

A soft 404 is different. It occurs when a page displays a missing-page message, or contains little usable content, while returning 200 OK or another misleading response. Google may classify it as a soft 404. Because the server still suggests that content exists, crawlers can continue requesting it.

Choose the correct response: 301, 302, 404, or 410

Choose a response according to what happened to the resource, not according to which status appears most SEO friendly. The destination of a redirect must satisfy substantially the same intent as the original URL.

SituationBest responseRequired follow-up
The resource moved permanently to an equivalent URL301 redirectUpdate internal links, canonicals, hreflang references, and the sitemap to the final URL.
The move is temporary and the original URL will return302 redirectKeep the original URL in the information architecture and remove the redirect when the temporary condition ends.
No relevant replacement exists404 Not FoundRemove internal links and sitemap entries, then serve a useful custom 404 page.
The resource is known to be permanently removed410 GoneRemove discovery signals and retain the status consistently.
The page is temporarily unavailable but should remain at the same URLUsually 200 with an accurate availability message, or 503 for a genuine service outageDo not describe an existing page as missing merely because an item is temporarily unavailable.

Google recommends permanent redirects for permanent moves and temporary redirects for temporary moves. It also warns against redirecting many unrelated URLs to a homepage because the result can confuse users and be interpreted as a soft 404.

For a discontinued product, redirect to a true successor only when it is a close replacement. A broad category can be appropriate if it clearly fulfills the same browsing intent, but keeping a 404 or 410 is cleaner when no meaningful substitute exists. Expired jobs, events, listings, and closed locations require the same relevance test.

Prioritize 404 errors with a value and risk framework

Do not measure success by reducing the raw 404 count to zero. Active sites naturally receive malformed URLs, obsolete external links, bot probes, and requests for resources that never existed. A useful backlog ranks URLs by recoverable value and ongoing harm.

SignalSuggested triage weightReason
Linked from a live internal page3 pointsCreates a preventable user and crawler dead end.
Previously generated conversions or material traffic3 pointsRepresents direct business and user demand.
Has relevant external backlinks2 pointsMay preserve referral value when an equivalent replacement exists.
Appears in an XML sitemap, canonical, or hreflang cluster2 pointsCreates conflicting technical signals.
Receives repeated human or verified search crawler requests1 pointShows continued demand or unresolved discovery paths.
Never had content, links, traffic, or internal references0 pointsUsually safe to leave as a 404.

This scoring model is a triage aid, not a search engine ranking formula. Review the highest totals manually. The decision still depends on whether a relevant destination exists. A valuable old URL should not be redirected to an unrelated page merely because it has backlinks.

Create separate work queues for broken internal links, redirect opportunities, sitemap cleanup, application defects, and harmless external requests. This prevents developers from spending release capacity on random bot-generated URLs while revenue-bearing errors remain unresolved.

How to audit and diagnose 404 errors

  1. Collect candidates. Use Google Search Console indexing reports, a full internal crawl, analytics landing-page reports, backlink tools, XML sitemaps, and server or CDN logs.
  2. Find the source. For each important URL, identify the linking page, anchor text, sitemap, redirect, script, navigation component, or external referrer that generated the request.
  3. Verify the HTTP response. Test the URL without relying only on what a browser displays. Check the initial status, every redirect hop, and the final status.
  4. Render JavaScript routes. Compare the raw response with the rendered page. A single-page application may return 200 from its application shell while rendering a client-side not-found message.
  5. Reconstruct intent. Review historical analytics, backlink anchors, URL patterns, content inventories, and any available archived copy to determine what the URL represented.
  6. Classify the remedy. Update a link, apply a relevant redirect, restore the page, return 404 or 410, or repair the router.
  7. Retest. Confirm that internal links resolve in one request, redirects terminate at the intended 200 page, and missing resources preserve a real 404 or 410.

Screaming Frog’s documented workflow can export response codes, inlinks, source pages, and anchor text. Logs add a dimension that crawls cannot: actual request frequency. Segment logs by status, URL pattern, user agent, referrer, and host so that crawler activity is not confused with human demand.

Fix broken URLs without creating redirect debt

When a live internal link points to a missing page, update the link at its source. Do this even if a 301 is also implemented. Direct links avoid unnecessary redirect hops and reduce dependence on a redirect map that may later be removed.

For migrations, build an old-to-new URL map before launch. Match pages by intent, topic, product identity, language, and locale rather than by superficial URL similarity. Test for loops, chains, redirects to another redirect, mixed protocol destinations, and accidental returns to the old host. A permanent redirect should terminate in one hop at a healthy, indexable destination.

Do not use canonical tags as replacements for redirects or error responses. A canonical is a hint about duplicate or similar indexable pages. It does not repair a broken navigation path, and a canonical placed inside a 404 template does not turn the missing URL into a valid page.

Remove dead URLs from XML sitemaps, hreflang annotations, structured data references, image manifests, navigation, and HTML canonicals. During content consolidation or decay remediation, redirect retired pages only when the surviving page substantially absorbs their purpose. Otherwise, preserve an honest 404 or 410 and strengthen links to the remaining hub or related spokes.

Build a custom 404 page that still returns 404

A custom 404 page is a user interface, not a replacement status code. It should render with the site’s normal design while the HTTP response remains 404. Test the response after changes to a CMS, CDN, reverse proxy, or application framework because any layer can replace the intended status.

A useful template should include a plain explanation, global navigation, a homepage link, site search when search works well, and a few stable category or task links. Large ecommerce, marketplace, documentation, and publisher sites can use the requested path to suggest a limited set of relevant destinations. Clearly label these as suggestions rather than pretending the original resource still exists.

  • Keep the message concise and avoid blaming the visitor.
  • Preserve accessibility, keyboard navigation, mobile usability, and fast loading.
  • Offer a broken-link report mechanism with the requested URL captured automatically.
  • Track recovery actions such as search use, category clicks, exits, and successful onward sessions.
  • Avoid an enormous list of links, aggressive promotions, or a forced redirect timer.

Do not block missing URLs in robots.txt merely to hide them. A crawler generally needs access to encounter the 404 response. Also avoid returning 200 for the template, redirecting every typo, or putting personalized information into an error page that may be cached.

Prevent and repair soft 404s, especially in JavaScript applications

Soft 404s often originate in application architecture. A server may deliver the same 200 application shell for every route, after which JavaScript decides whether content exists. Google advises single-page applications to produce meaningful status handling rather than relying on a client-rendered missing-page message.

Prefer server-side or edge routing that can determine resource existence before returning the response. If the platform cannot set a status after rendering begins, route invalid paths to a server endpoint that returns a true 404. Test direct requests, refreshed deep links, escaped fragments, uppercase variants, locale paths, trailing slash variants, invalid pagination, and deleted database records.

Other failure modes include an origin returning 404 while a CDN rewrites it to 200, a reverse proxy converting all errors into a successful branded template, and APIs returning a 200 envelope with an internal error field. API conventions can differ, but public HTML routes intended for search should communicate missing resources through the HTTP layer.

The 2025 WebSci redirection study identified 62,000 custom 404 URIs in its dataset and classified nearly half as soft 404s. This does not establish a universal web rate, but it demonstrates that status and redirect defects are common enough to justify automated tests. Add known invalid routes to release checks and alert when their status changes.

Manage 404s at enterprise and crawl-budget scale

Google’s crawl-budget guidance, updated July 22, 2026, describes 404 as a strong signal not to recrawl a URL. Soft 404s can continue consuming crawl resources because the server appears to offer content. This distinction matters most on large, rapidly changing sites with faceted navigation, inventory churn, generated parameters, or millions of historical URLs.

Use logs to identify repeated 404 patterns rather than treating every URL as an isolated ticket. A shared prefix may expose a broken navigation module, malformed pagination rule, outdated mobile path, case-sensitivity change, or parameter generator. Fixing the generating rule can remove thousands of errors without creating thousands of redirects.

Keep XML sitemaps limited to canonical URLs intended for indexing. Partition sitemaps by content type, template, locale, or update frequency so anomalies can be traced to an owner. Avoid redirect chains, preserve stable URLs where possible, and retire migration redirects only after checking residual crawler requests, backlinks, internal references, and business risk.

Monitor the percentage of verified search crawler requests that receive 404, but interpret it by source and pattern. A rising rate can signal a release defect. A stable volume of requests to ancient or invented URLs may require no action. For crawl prioritization, combine request frequency with internal link count, business value, backlink strength, and the availability of a relevant remedy.

Evidence boundaries, implementation plan, and KPIs

What is proven

HTTP standards define 404 and 410 as distinct responses. Google officially recommends 301 for permanent moves, 302 for temporary moves, and 404 or 410 when no replacement exists. Google also documents soft 404 processing, warns against irrelevant homepage redirects, and requires indexable, snippet-eligible pages for participation as supporting links in its AI search features.

What reflects practitioner consensus

Experienced technical SEO teams prioritize internally linked errors, valuable backlinks, traffic-bearing URLs, and sitemap conflicts before harmless historical 404s. Ahrefs gives similar prioritization guidance. Recent Reddit discussions repeat these distinctions, but those reports are anecdotal and do not establish causal ranking effects.

What remains uncertain

No public evidence establishes a universal safe number or percentage of 404s. The exact discovery and citation behavior of individual AI answer systems is also variable and partly undisclosed. Independent link-rot studies demonstrate prevalence, but their datasets should not be treated as benchmarks for every site.

A practical 30-day sequence

  1. Baseline true 404s, soft 404s, internal inlinks, sitemap conflicts, backlink value, traffic, and log demand.
  2. Repair shared templates and internal links before creating URL-level redirects.
  3. Redirect only verified equivalents, restore uniquely valuable resources, and leave irrelevant requests as 404 or 410.
  4. Correct sitemaps, canonicals, hreflang references, structured data URLs, and JavaScript routing.
  5. Retest status codes and redirect paths, then compare the next complete crawl and log period.

Track broken internal links, soft 404 count, sitemap URLs returning non-200 responses, redirect chains, high-value backlink targets returning 404, 404 landing sessions, recovery click rate, successful onward sessions, and repeated crawler requests to defective URL patterns. Compare like-for-like periods and annotate releases or migrations before attributing changes to remediation.

FREQUENTLY ASKED QUESTIONS

SEO Questions Answered

Do 404 errors hurt SEO?

A normal 404 does not create a sitewide penalty. It becomes an SEO or business problem when important URLs disappear, internal links break, backlinks point to missing resources, sitemap signals conflict, or a soft 404 wastes crawling and remains ambiguously indexable.

Should every 404 redirect to the homepage?

No. Redirect only to a genuinely relevant replacement. Google warns that mass redirects to an unrelated homepage can confuse users and may be treated as soft 404s. Keep a true 404 or 410 when no suitable replacement exists.

What is the difference between 404 and 410?

404 means the server cannot find a current representation and does not specify whether the condition is permanent. 410 explicitly indicates that the resource is known to be gone. Both are appropriate removal signals when no replacement exists.

What is a soft 404?

A soft 404 is a page that appears missing or substantially empty but returns 200 OK, redirects irrelevantly, or otherwise sends a misleading HTTP signal. Search engines may classify it as missing even though the server reports success.

Should a custom 404 page return 200 or 404?

It should return 404. The custom design can include navigation, search, related destinations, and recovery options, but the HTTP response must accurately say that the requested resource was not found.

Should 404 URLs remain in an XML sitemap?

No. XML sitemaps should contain canonical URLs intended for indexing. Remove 404, 410, and redirected URLs, then include the final indexable destination when one exists.

Should a discontinued product return 404 or redirect?

Redirect it when a close successor or equivalent replacement satisfies the same intent. Keep the product accessible if it is temporarily unavailable. Use 404 or 410 when it is permanently removed and no meaningful substitute exists.

How long should 301 redirects for deleted pages remain?

There is no universal duration. Keep important migration redirects while users, crawlers, internal references, or backlinks still request the old URL. Review logs and links before removal, especially for URLs with durable external references.

How often should a site audit for 404 errors?

Monitor continuously after migrations and major releases. For stable sites, schedule recurring crawls and review logs, Search Console, sitemap validation, analytics, and backlink reports. Audit frequency should increase with publishing volume, inventory churn, and platform complexity.

Can 404 errors affect Google AI Overviews or other AI answers?

A missing URL cannot remain an indexable supporting result. Google says AI features use the foundational technical requirements of Search, including indexability and snippet eligibility. Other AI systems differ, but stable and accessible source pages are safer for retrieval and citation.

RESEARCH SOURCES

Sources and Verification

  1. RFC 9110, HTTP SemanticsPrimary standards source defining 404 Not Found, 410 Gone, redirects, and other HTTP semantics.
  2. MDN Web Docs, 404 Not FoundTechnical reference explaining the 404 response and common causes such as moved, deleted, or mistyped URLs.
  3. Google Search Central, SEO Starter GuideOfficial Google guidance covering redirects, missing pages, crawlable links, and search fundamentals.
  4. WebSci 2025 Redirection StudyIndependent research examining redirects, custom 404 URIs, soft 404 classification, chains, link rot, and server instability.
  5. WebSci 2025 Redirection Study, Author PDFAuthor-hosted paper supporting the reported redirection and soft 404 findings.
  6. University of Michigan Link Rot Research2025 research discussing deleted pages, inaccessible hosts, and the limitations of archived copies.
  7. Ahrefs, 404 Page Error in Site AuditCurrent practitioner guidance prioritizing 404s with internal links or meaningful backlinks and discouraging irrelevant redirects.
  8. Screaming Frog SEO Spider TutorialsPractitioner documentation for crawling response codes and exporting source pages, anchors, inlinks, and broken-link data.
  9. Reddit SEO Discussion on Large URL InventoriesCurrent community discussion reflecting practitioner distinctions between harmless historical URLs and actionable technical errors. Anecdotal evidence only.
  10. Research sourceConsulted during live web research for this page.
  11. Research sourceConsulted during live web research for this page.
  12. Research sourceConsulted during live web research for this page.
  13. Google Search Central, Crawl Budget ManagementOfficial crawl-budget documentation, updated July 22, 2026, discussing 404 signals, soft 404 crawling, sitemaps, and redirect chains.
  14. Broken Links on Majestic Million Homepages2024 independent study of 88,000 homepages that found 35.2 percent had at least one broken link. The result is prevalence evidence, not a universal benchmark.
  15. Reddit SEO Discussion on Homepage RedirectsCommunity observations about large 404 inventories and the risks of redirecting unrelated URLs to a homepage. Not causal evidence.
  16. Research sourceConsulted during live web research for this page.
  17. Google Search Central, Site Moves With URL ChangesOfficial migration guidance warning against irrelevant mass redirects and recommending direct destination mapping.
  18. Broken Links in Stack Overflow PostsIndependent study illustrating the persistence of link rot in community-maintained technical knowledge.
  19. Google Search Central, Do Not Use 404 and 403 for Rate LimitingOfficial explanation that most 4xx responses can cause affected content to be removed from Google Search.
  20. Google Search Central, JavaScript SEO BasicsOfficial guidance for status handling and indexable routes on JavaScript sites and single-page applications.

SEOS.CO EXPERT MATCH

Ready to Find the SEO Partner That Can Win Your Market?

Tell us your market, goals and growth targets. SEOS.co will help narrow the field and connect you with a serious SEO partner built for the opportunity.

Research-backed guidanceBuilt around your marketNo canned shortlist
Get My Free SEO Agency RecommendationTell us what you need. We will help narrow the field.