A 404 error happens when someone tries to visit a page that does not exist on your site. The URL was wrong, the page was deleted, the link was broken, or something else went wrong. The result is the same: the visitor gets an error message instead of useful content.
404 errors are inevitable. Every site of meaningful size has them. The question is not how to eliminate 404s entirely. The question is how to handle them in a way that does not make the situation worse, and where possible, turns the moment into something useful.
This piece covers what 404 errors are, why they happen, how to design 404 pages that help users, and how to manage the broader 404 picture for SEO and user experience.
What a 404 Error Actually Is
The 404 is one of several HTTP status codes that servers send to browsers. It means “I looked for what you asked for, and I cannot find it.”
The HTTP Status Code
When a browser requests a URL, the server responds with a status code. 200 means everything is fine. 301 and 302 mean redirects. 404 means the requested resource does not exist.
The browser sees the 404 and typically displays whatever 404 page the server provides. If the server does not provide one, the browser shows its own default error message.
When 404s Happen
404s appear in several common situations:
Someone typed the URL wrong.
Someone followed an old link that points to deleted content.
A search engine has the URL in its index but the page no longer exists.
Someone shared a link incorrectly.
An automated tool is probing URLs that do not exist.
The pattern is that the request reached your server, but the server has nothing to serve at that URL.
How Servers Generate the 404 Response
The web server (Apache, Nginx, IIS) is configured to return a 404 when the requested resource is not found. For dynamic sites like WordPress, the CMS handles the 404 logic.
You can customize what gets sent back when a 404 happens. This is where good 404 management starts.
Why 404 Page Design Matters
The default 404 page from most platforms is terrible. Plain text saying “404 – Not Found.” Nothing else.
Visitor Experience
A visitor who hits a 404 had some intent. They wanted something specific. The default 404 page tells them they cannot have it and leaves them stuck. Many will just close the browser.
A well-designed 404 page acknowledges the problem and helps the visitor find what they wanted. This salvages a portion of the lost visits that the default page would have wasted.
SEO Considerations
Search engines see 404 pages too. A site with many bad-looking 404s is a worse user experience signal than a site with helpful 404 pages.
The 404 status itself is fine for SEO when the page genuinely does not exist. The way it is handled affects user experience metrics that feed into rankings.
Brand Impression
A broken-looking 404 page makes the site look amateurish. A well-designed 404 page reinforces the brand even at a moment of failure.
Designing a Helpful 404 Page
A good 404 page does several things.
Acknowledge the Problem Clearly
The visitor needs to understand what happened. Make it clear: the page they tried to reach does not exist.
Do not be cute about it. “Oops!” combined with no further explanation is more frustrating than helpful.
Stay On Brand
The 404 page should look like the rest of the site. Same header. Same footer. Same fonts. Same color scheme. The visitor should not feel like they hit a different website.
Provide a Search Function
A search box on the 404 page lets visitors find what they were looking for. If they typed the URL wrong or the page moved, search may surface the right content.
Show Recent or Popular Content
Recommend popular posts, featured products, or other content that might catch their interest. Many visitors who hit a 404 are not deeply committed to any specific page. Showing them something interesting can keep them engaged.
Include Main Navigation
The standard navigation should be present. The visitor should be able to get to the home page, key sections, or contact information from the 404 page.
Offer a Contact Path
If the visitor cannot find what they wanted, give them a way to reach out. A contact link, an email address, or a chat widget. For some visitors, this saves the relationship.
Avoid Common Pitfalls
A few things to avoid:
Do not auto-redirect to the home page. The visitor will think the site is broken. They wanted a specific page, not the home page.
Do not load slowly. The 404 page should be fast. Visitors are already frustrated.
Do not be condescending. The visitor did not necessarily do anything wrong. The link may have been bad on someone else’s site.
Do not blame the visitor. Even if they did type the URL wrong, framing it as their fault is not helpful.
Setting Up a Custom 404 Page
The setup varies by platform.
WordPress
WordPress themes usually include a 404 template called 404.php. The contents of that template determine what visitors see.
You can edit the 404 template directly in the theme (use a child theme to avoid losing changes during updates). Or use a plugin that gives you a visual editor for the 404 page.
Several WordPress plugins help with 404 pages specifically: 404page is one of the popular options.
Static Sites
Static site generators have their own conventions for 404 pages. Most expect a file called 404.html at the root of the site.
Hosts like Netlify and Vercel automatically serve 404.html when a requested URL is not found.
Apache
Apache servers use the ErrorDocument directive in .htaccess or the main server config. The directive points at the file to serve when a 404 occurs.
ErrorDocument 404 /404.html
Nginx
Nginx uses the error_page directive in the server configuration.
error_page 404 /404.html;
Cloud Platforms
AWS, Google Cloud, and Azure all have their own ways to configure custom 404 responses. The specifics depend on the service used (S3 with CloudFront, App Engine, others).
When to Redirect Instead of 404
Sometimes the right answer is not a 404 page but a redirect to relevant content.
Recently Removed Content
If content has been removed but similar content exists, redirecting to that similar content is usually better than a 404.
A removed blog post might redirect to a related current post. A removed product page might redirect to the category page or a replacement product.
URL Structure Changes
When you change URL structures (changing permalinks, restructuring categories), redirect the old URLs to the new ones. This preserves SEO value and user experience.
Migration to New Domain
When you change domains, every URL on the old domain should redirect to the corresponding URL on the new domain. This maintains traffic and search rankings.
When NOT to Redirect
Some 404s should stay as 404s.
Old content that no longer exists and has no replacement should return 404. Redirecting to the home page or another generic page is worse than a clean 404.
Mass redirects to the home page are an SEO signal of low quality. Search engines treat them as soft 404s, which is bad.
URLs that never existed (typos, probing by attackers) should return 404. Redirecting them to anything is unnecessary.
Managing 404 Errors at Scale
For larger sites, 404 management becomes more involved.
Tracking 404 Errors
You cannot manage what you do not measure. Several tools track 404 errors:
Google Search Console shows 404 errors that Google has encountered.
Google Analytics can track 404 page views as events.
Server logs show every 404 that any visitor or bot has hit.
WordPress plugins like Rank Math and All in One SEO log 404 errors that occur on the site.
Reviewing the 404 Log
For each 404 in the log, decide what to do:
If many visitors are hitting it, set up a redirect to relevant content.
If it is from an old URL pattern, set up a pattern-based redirect for all similar URLs.
If it is a typo of a real URL, consider if a redirect makes sense or if the typo is too random to be worth fixing.
If it is from an attack or scan, ignore it. Some 404s are just noise.
Patterns vs Individual Fixes
For sites with many 404s, look for patterns rather than fixing each one individually. If hundreds of URLs are 404ing because of a category restructure, one regex-based redirect rule handles all of them.
Setting Priorities
Not every 404 needs a fix. The most important ones to handle are:
URLs that get significant traffic (real visitors are being affected).
URLs that have external links pointing to them (SEO value being lost).
URLs that were on key pages or related to important content.
Random low-traffic 404s might just be noise. Triage based on impact.
Soft 404s & Why They Matter
Soft 404 is a term Google uses for pages that look like 404s but return a 200 status code.
What Makes a Soft 404
A page that says “Sorry, this content does not exist” but returns a 200 status. The page exists technically, but it does not have real content.
Mass redirects to a generic page (like the home page) are also treated as soft 404s.
Why They Are Worse Than Real 404s
Real 404s tell search engines clearly that the content does not exist. The crawler can remove the URL from the index and move on.
Soft 404s look like real content to search engines initially. Eventually the engines figure out the page is essentially empty, and that creates worse SEO signals than a clean 404 would have.
How to Fix Them
If a page genuinely has no content, return a proper 404 status code.
If a page has relevant content but looks thin, add real content.
If you have been mass redirecting deleted pages to the home page, switch to either targeted redirects to relevant content or proper 404s for content that has no replacement.
Other Error Codes Worth Knowing
While 404 is the most common, other errors matter too.
500 Internal Server Error
The server tried to handle the request but failed. This indicates a real problem (broken code, server issues, database problems). Should be investigated and fixed.
503 Service Unavailable
The server is temporarily down. Useful for planned maintenance. Use this rather than 404 when the site is briefly offline.
410 Gone
Like 404 but indicates the content has been permanently removed. Useful for content you have deliberately deleted with no plan to replace it.
301 vs 302 Redirects
301 is permanent. 302 is temporary. For long-term redirects of moved content, use 301. For short-term redirects (limited promotions, A/B tests), use 302.
Using 302 for permanent moves can confuse search engines and slow down SEO updates.
Common 404 Management Mistakes
People stumble in predictable ways.
Default 404 Pages
Sites that have never customized their 404 page give visitors a poor experience and lose traffic at the moment of failure.
Mass Redirects
Redirecting all 404s to the home page hurts SEO and frustrates users.
Ignoring 404 Logs
Without monitoring, you do not know what 404s are happening. The opportunity to fix the important ones gets missed.
Auto-Redirects Without Logic
Some sites use plugins that automatically redirect 404s based on URL similarity. This sometimes works but often sends visitors to the wrong place. Use manual or carefully-tested redirect strategies.
Forgetting the Brand on Error Pages
The 404 page is often an afterthought. Treating it as a real part of the user experience produces better results than treating it as a fallback nobody will see.
Bringing Error Page Strategy Together
404 errors are an inevitable part of running a website. The question is how to handle them in a way that minimizes the negative impact and where possible turns them into useful interactions.
The basics are not complicated. Design a 404 page that helps visitors find what they were looking for. Set up redirects for content that has moved or been removed. Monitor your 404 logs and address the important ones. Avoid the common mistakes that make 404s worse.
For most sites, the 404 page is a one-time design project that pays off forever. Spend the time to make it good. Add a search box. Recommend popular content. Make sure it looks like the rest of the site. Test it on mobile and desktop.
The ongoing work is the monitoring and redirect management. Quarterly review of 404 logs catches the issues that matter. Pattern-based redirects handle systemic problems. Individual redirects handle specific cases.
Sites that take 404 management seriously give visitors a better experience even at moments of failure. The investment is modest. The payoff shows up in retained visitors, better SEO signals, and a more professional overall experience. For sites that have ignored 404 management until now, the improvements are usually quick wins. The 404 page becomes one less thing to worry about, and visitors who would have left frustrated stay engaged with the site instead.