What Is a 404 Not Found Error (and How to Fix It)
Unlike a 500 error, which means the server has a problem, a 404 Not Found error is a client-side error. It means the server is reachable (the site is "UP"), but the specific page or resource you're trying to access doesn't exist at that URL.
What Is a 404 Not Found Error?
A 404 is an HTTP status code indicating that the server could not find the requested resource. This is the "Page Not Found" error you see all over the web. It means the link you clicked is broken, you mistyped the URL, or the page was moved or deleted and not redirected.
Common Causes of 404 Errors
As a site visitor, the cause is simple: the URL is wrong. You can try retyping it or going to the site's homepage to find the page. As a site owner, 404 errors are your responsibility to fix, as they create a bad user experience and can hurt your SEO.
1. Mistyped URL
The user simply typed the URL incorrectly. This is out of your control, but a good, helpful 404 page can guide them back to the right place.
2. Broken Links
This is the most common technical cause. You have a link on one of your pages (e.g., your "About" page) that points to another page (e.g., /my-servces/), but the correct URL is /my-services/. That typo creates a broken link and a 404 error when clicked.
3. Deleted or Moved Content
You deleted a blog post or changed the URL of a page (e.g., from /blog/my-post to /blog/my-awesome-post) but forgot to set up a redirect. Now, any old links pointing to the original URL (from Google or other sites) are broken.
4. Caching Issues
Sometimes, your browser might cache a 404 error page. Even after you've fixed the issue, your browser keeps showing you the old error. Clearing your browser cache can fix this (though this is a visitor-side fix).
How to Find and Fix 404 Errors on Your Site
1. Use Google Search Console
This is the best way to find 404 errors that Google's crawler has found. It's free and essential for any website owner.
- Log in to Google Search Console.
- Go to the "Pages" report.
- Look in the "Not found (404)" section. This will give you a list of all URLs on your site that Google tried to crawl but couldn't find.
2. Set Up 301 Redirects (The Right Fix)
Once you have your list of 404 URLs from Google Search Console, you need to redirect them. A 301 redirect permanently "forwards" an old, broken URL to a new, working one. This tells both users and search engines where the content has moved, passing along any SEO value.
- Example: If
/old-pageis 404ing, but the new, relevant page is/new-page, you set up a 301 redirect from the old URL to the new one. - How to do it: In WordPress, you can use a plugin like "Redirection." On other servers, you may need to edit your
.htaccessfile to add redirect rules, like:Redirect 301 /old-page /new-page
3. Create a Custom 404 Page
You can't fix every typo a user makes. For those cases, you need a helpful, custom 404 page. Instead of a blank "Not Found" message, your 404 page should:
- Have your site's normal design and navigation.
- Apologize for the error in friendly language.
- Provide a search bar.
- Link to your homepage and other popular pages.