Technical SEO

404 Error Handling: Best Practices for Website User Exper...

November 21, 202518 min readByLLM Visibility Chemist

404 Error Handling: A Practical, SEO-First Guide

404 errors happen. A user clicks a broken link, a page is moved, or a product is removed. What matters for SEO is how we handle those errors so search engines and users aren’t left guessing where to go next. This guide walks you through a clear, actionable approach to detecting, fixing, and preventing 404s, while tying every decision to core SEO principles.

What you’ll get here

  • A precise definition of 404 error handling and how it differs from related status codes.

  • The direct SEO implications of 404s and how to balance crawl efficiency with user experience.

  • A practical, step-by-step playbook to detect, decide, implement, and monitor 404s.

  • Concrete examples, templates, and code you can deploy today.

  • Links to authoritative sources for every major claim so you can verify best practices.

What is 404 Error Handling?

A 404 Not Found error is a server response indicating that the requested resource does not exist at the given URL. It’s a standard HTTP status code that signals “not found.” In practice, 404s arise when content is removed, moved without a proper redirect, or never existed at that URL in the first place. There are related statuses you’ll encounter and sometimes confuse with 404s:

  • 410 Gone: The content was intentionally removed and is permanently gone. This is a stronger signal to search engines than a 404 for permanent removals. See MDN’s definition for 410 Gone. 410 Gone

  • 301/302/307 redirects: Redirects tell search engines and browsers where the content has moved. A 301 indicates a permanent move; a 302/307 indicates a temporary move. Google and other search engines treat redirects as signals about content location. See general redirect guidance in major docs and SEO sources. For concrete guidance, you can consult Google's redirect guidance and migration best practices in primary SEO sources. 301 Redirects | 302 Redirects | Soft 404

  • Soft 404: When a page returns a 200 status (success) but contains little or no meaningful content, search engines may treat it as a soft 404. This often results in the page being excluded from indexing or downgraded in quality signals. See Moz’s guide on soft 404s. Soft 404

The core idea of 404 error handling is to manage user experience and search engine signals in a way that preserves crawl efficiency, preserves or improves the index, and reduces friction for visitors. In practice, you’ll decide between allowing a page to return 404, serving a 410 for permanent removals, or implementing redirects to relevant, existing content. This decision happens within the broader context of your site’s information architecture and content strategy. For authoritative context on how Google approaches 404s, redirects, and crawl errors, see Google’s official guidance and the broader crawl/redirect documentation available in the SEO ecosystem. Google Search Central

Why 404 Handling Matters for SEO

Two big pillars drive why we pay attention to 404 handling: crawl efficiency and user experience. Both influence how search engines understand and rank your site, and both affect how visitors behave when they land on a dead end.

  1. Crawl efficiency and indexing

Search engines crawl the web to discover and index content. When a site returns a lot of 404s or dead-ends, it can waste crawl budget and slow updates to your live pages. While crawl budget is a nuanced topic, the practical takeaway is: avoid wasting crawlers on irrelevant or non-existent pages, so they can focus on pages that matter. Directional guidance from major SEO resources emphasizes clean signals through proper redirects and well-managed error pages. For a foundational discussion on crawl budget and how it relates to site health, refer to Google’s guidance in the crawl budget documentation and related articles. Crawl Budget

  1. User experience and engagement

When users land on a 404 page, the way you handle the experience can affect bounce rates, time on site, and subsequent conversions. A well-designed 404 page can guide users back into a meaningful journey rather than leaving them stranded. Nielsen Norman Group highlights best practices for error pages that reduce frustration and improve navigation. 404 Pages UX

  1. Content lifecycle and site health

Regularly auditing for 404s helps you keep an accurate sitemap, ensures internal links remain valid, and maintains a coherent information architecture. If content is truly gone, you can use a 410 Gone to communicate permanence to search engines; if content has moved, use a proper redirect. Moz and other authoritative voices explain the distinction between 404, 410, and redirects and why it matters for long-term SEO health. 410 Gone | Soft 404

Note: The recommendations here are anchored in core SEO principles: clear signals, good user experience, and stable indexing. The exact approach (404 vs 301 vs 410) should be aligned with your site’s goals, content lifecycle, and user expectations.

Main Content Sections

Detecting and Inventorying 404s

Before you can fix 404s, you must discover them at scale. A reliable inventory lets you quantify scope, prioritize fixes, and measure impact after changes.

What to include in your detection setup

  • Server logs: Raw access logs show exactly which URLs return 404 status codes and how often. You’ll want to extract 404 entries and group by URL, status, and referrer to identify patterns (for example, many 404s caused by an outdated internal link or an external source mislinking to a long-lived page).

  • Google Search Console (GSC): GSC’s Coverage report surfaces 404s that Google has encountered and attempted to crawl. Use the “Not found” or “Excluded” sections to pinpoint pages that need attention and track how they change after fixes. This is a baseline signal used by many SEO teams to triage issues. Google Search Console Help

  • Crawl tools: Site crawlers (like Screaming Frog, Sitebulb) reproduce how a search engine traverses your site and identify 404s, broken redirects, and orphaned pages. Set up a crawl that matches your site’s scale and frequency, then export a prioritized report. Tools like Screaming Frog commonly show a CSV you can import into a ticketing workflow. Screaming Frog SEO Spider

  • Internal link checks: Run a periodic audit of internal links to ensure none point to non-existent resources. Internal broken links are a frequent cause of 404s and can mislead both users and crawlers. Regular internal link audits reduce duplication and improve crawl efficiency. See Moz on internal linking and errors as a reference for how to think about link health. 404 Errors in SEO

A practical, repeatable workflow

  1. Gather data from GSC, server logs, and a crawler run. Create a single master list of URLs that return 404s, with fields: URL, first seen, last seen, traffic, internal vs external cause, and any related redirects.

  2. Classify by cause:

  • Moved content with a correct redirect (redirects should be implemented, not just identified)

  • Permanently removed (410 Gone)

  • Never existed (hard 404) or soft 404s (200 with thin content)

  • Misconfigured links (typos, URL slugs that changed)

  1. Prioritize fixes by impact:

  • High traffic pages or pages with inbound links

  • Pages that affect conversions (product pages, checkout, signup)

  • Pages that cause cascading crawl waste (e.g., many internal links lead to dead ends)

  1. Create a remediation plan:

  • For moved content: implement proper redirects (301) to the new location

  • For permanently removed content: decide between 410 and a redirect to a relevant page

  • For pages that never existed: decide whether to create a replacement or leave as 404

  • For misconfigured links: fix source links, not just the dead page

  1. Schedule and automate:

  • Set up ongoing crawls weekly or monthly depending on site size

  • Schedule a recurring review of GSC and log files

  • Implement alerting for new 404s that appear beyond your normal baseline

  1. Measure impact:

  • Re-run crawls and GSC after fixes to confirm reductions in 404s

  • Monitor changes in crawl statistics, indexing coverage, and user behavior on related pages

  1. Document and share:

  • Maintain a changelog of fixes and redirects

  • Report impact to stakeholders with before/after metrics

Implementation examples

  • Example: Using a 301 redirect for moved content

  • Scenario: A product page was moved to a new URL.

  • Action: Implement a 301 redirect from the old URL to the new URL in your server config or CMS routing.

  • Verification: Re-crawl the old URL and verify a 301 status and the new page’s content is accessible. Check Google Search Console to ensure the old URL is no longer listed as not found and that the new URL is indexed if appropriate.

  • Why this works: 301 redirects preserve link equity and provide a clear signal to search engines about the new location. See Google’s guidance on redirects and the general consensus in SEO practice. 301 Redirects

  • Example: Using a 410 Gone for permanently removed content

  • Scenario: An old article is permanently removed with no replacement.

  • Action: Return a 410 Gone status for the URL.

  • Verification: The URL should disappear from the index, freeing crawl budget for other content. Track how the corresponding entry moves from “Not Found” to “410” in your crawl/monitoring tools. See MDN’s explanation of 410 Gone for the semantic signal it provides. 410 Gone

  • Example: Understanding soft 404 and remediation

  • Scenario: A page returns 200 but has thin content and no value to users or crawlers.

  • Action: Either replace with meaningful content or convert to a proper 404/410 or a redirect to a related resource if appropriate.

  • Verification: Ensure the page is not returned as a meaningful resource in indexing. See Moz’s guide on soft 404s for criteria and remediation steps. Soft 404

  • Example: 404 page design as a usable fallback

  • Scenario: A user lands on a broken link or removed content.

  • Action: Serve a custom 404 page that clearly states the page isn’t available, provides a helpful search, and points to popular sections.

  • Follow best practices for 404 pages from NNGroup and SEO-focused sources to reduce friction and keep users moving through the site. 404 Pages UX

How to decide between 404, 410, and redirects

  • If the content was moved permanently to a new URL: use a 301 redirect from the old URL to the new one.

  • If the content was intentionally removed and will not return: consider a 410 Gone to signal permanence; you may still redirect older, nonessential pages to a related resource if it keeps users engaged.

  • If a page exists but is temporarily unavailable: use a 503 Service Unavailable (with a Retry-After header) if you’re performing maintenance, not a 404.

  • If the page never existed or is a duplicate: a clean 404 (or 410 if permanent) is the right signal; avoid soft 404s that disguise the error.

  • Best-practice sources for redirects and 410 decisions appear across Google's guidance and major SEO publications. For practical interpretation and examples, consult Moz on 404s and 410s, and MDN for status semantics. 410 Gone | Soft 404 | 301 Redirect

Designing and Implementing Effective 404 Pages

A high-quality 404 page should be informative, not confusing, and a springboard back into the site. It isn’t just a vanity page; it’s a critical UX touchpoint that preserves user intent and signals site structure to search engines.

What a strong 404 page includes

  • Clear identification that the page isn’t found, not a generic “you’re screwed” page. A concise message helps users understand what happened without confusion.

  • A helpful search box or site-wide navigation: Users should be able to quickly find what they were seeking. Make it easy to jump to popular sections or to a product catalog or blog hub.

  • A list of relevant links: Show a small set of related topics, popular pages, or a site map snippet to guide users toward value.

  • A consistent design with your brand: The moment users see a 404, the page should feel like it belongs to your site, not an outsourced error screen.

  • A quick feedback mechanism: A simple “Was this page helpful?” can help you triage and improve the error experience over time.

Implementation steps

  1. Create a dedicated 404 template in your CMS or framework that mirrors your site’s style and branding.

  2. Include a prominent search field and a clear link to the homepage, plus links to top-level sections (e.g., Products, Blog, Contact).

  3. Add helpful copy: briefly explain that the page isn’t available and suggest steps to find what they need.

  4. Include a polished visual design and a lightweight, fast-loading page. Users expect speed even on error pages.

  5. Add structured data where relevant (for example, to help users find meaningful content or to guide crawlers) and ensure the 404 page itself returns a 404 status code.

  6. Test across devices and browsers to ensure accessibility and usability.

Code example: a simple 404 page (HTML)

Code example: Apache .htaccess redirect (301)

Code example: Nginx redirect (301)

These snippets give you practical templates you can adapt. The key is to implement 404-friendly UX, not just a generic error screen. For UX guidance on 404 page design, see NNGroup’s recommendations. 404 Pages UX

Internal Linking and 404s: Protecting Crawlability

Internal links are the connective tissue of your site. When those links point to 404s, you waste crawl budget, confuse users, and erode the value of nearby content. A proactive approach to internal links reduces 404s and helps search engines understand your site structure.

Auditing internal links

  • Map top-level navigation and core content clusters first. Check that every major hub page links to meaningful subtopics and that those subtopics link back to the hub where appropriate.

  • Check for internal links pointing to pages that no longer exist or have moved without redirects. Export a crawl result and filter for 404 status codes encountered via internal links.

  • Prioritize fixes for internal links in high-traffic pages, landing pages, and pages with inbound links.

Remediation steps

  1. Update or remove broken internal links. If you can, point them to the correct, relevant resource.

  2. If a page has moved, implement a 301 redirect from the old URL to the new URL to preserve link equity and user experience.

  3. If the page no longer exists and has no substitute, either 404 or 410 the page, and consider removing the internal link that would lead to it.

  4. Audit internal link patterns to avoid repeating broken paths as you add new content.

Why this matters for search engines

  • Clean internal linking signals help crawlers discover and index the right pages more efficiently.

  • Reducing internal 404s reduces wasted crawl budget and helps ensure the most important pages stay updated in the index.

  • Moz’s guidance on 404s and links highlights the importance of clean link signals and avoiding unnecessary dead ends. 404 Errors in SEO

Ongoing Monitoring and Maintenance

404 handling isn’t a one-time task. It’s an ongoing discipline that involves monitoring, reporting, and iterative improvement. Set up a repeatable rhythm that fits your site’s scale.

Recommended cadence

  • Weekly checks for smaller sites; bi-weekly or monthly for larger sites.

  • Monthly audits of 404s tied to high-traffic or high-conversion pages.

  • Quarterly reviews of the site’s information architecture to anticipate content changes (and to prevent new 404s as a result).

Tools and processes to use

  • Google Search Console: Regularly review the Coverage report for 404 entries and “Not Found” issues. Use the data to identify patterns (e.g., mislinks from specific posts or pages). Google Search Console Help

  • Server logs: Analyze 404s by referrer to see if external sites frequently link to a wrong URL or if internal links are broken due to slug changes.

  • Crawlers: Run a crawl to identify new 404s and test redirects after implementing fixes.

  • Alerts: Set up automated alerts for new 404s on important pages, so you can react quickly. This helps protect crawl budget and user experience over time.

Measuring impact

  • 404 reduction: Track the number of unique 404 URLs before and after fixes.

  • Crawl efficiency: Observe crawl rate on critical pages and whether Google’s indexing behavior improves (e.g., fewer not-found errors in GSC).

  • User behavior: Look for improvements in bounce rate and average session duration on pages affected by redirects or updated internal links.

  • Indexing health: Check that the correct pages are indexed and that redirects don’t create indexing issues or duplicate content signals.

Evidence-based practices and sources

  • Crawling and indexing are central to how search engines understand your site; monitor with Google Search Console and crawl tools to ensure your 404 handling aligns with crawl expectations. Crawl Budget | Google Search Console Help

  • A good 404 experience reduces user frustration and keeps users on your site longer. NNGroup’s analysis of 404 pages highlights practical UX improvements. 404 Pages UX

  • Distinctions among 404, 410, and redirects matter for long-term SEO health; avoid soft 404s and use redirects or status codes that reflect the real content lifecycle. Soft 404 | 410 Gone | 301 Redirect

Conclusion

404 error handling is not just about stopping “not found” messages—it’s about preserving crawl health, maintaining a coherent information architecture, and delivering a clean user experience. By systematically detecting 404s, making informed decisions about redirects and status codes, designing effective 404 pages, protecting internal links, and maintaining a disciplined monitoring routine, you keep search engines informed and users engaged.

Key takeaways

  • Detect 404s across data sources (GSC, logs, crawlers) and inventory them with context (cause, impact, priority).

  • Decide deliberately: use 301 redirects for moved content, 410 for permanent removals, and appropriate status codes for genuine non-existence.

  • Invest in a high-quality 404 page that reduces user friction and guides visitors back into the site.

  • Protect crawlability by cleaning internal links and fixing broken links at the source.

  • Establish a recurring maintenance rhythm with clear metrics to prove impact and continuously improve.

Next steps to implement today

  • Audit your site for 404s using a combination of Google Search Console data and a nightly crawl.

  • Create or refine a dedicated 404 page with a strong navigation path and a search box.

  • Implement or correct redirects for moved content; add a 410 for pages that are permanently removed without replacements.

  • Schedule a monthly internal link health check and address broken links.

  • Set up automated alerts for new 404s on high-priority pages and review results in the next sprint.

Related topics to explore

  • How to plan an SEO-friendly redirects strategy for site migrations

  • Best practices for canonicalization to avoid duplicate content and unintended 404s

  • Structured data and error handling in dynamic sites and CMS environments

Sources

Related Guides

Need Help Implementing These Strategies?

We help you master AI SEO, traditional SEO, and marketing to grow your brand and product visibility.

LLM Visibility & AI SEO
Traditional SEO
Product Marketing
Brand Marketing
LLM Visibility
Product Marketing
Traditional SEO
Brand Marketing