Dealing with 404 errors? Learn how to handle 404 Pages for SEO and ensure that your website is friendly to both users and search engines.
How to Handle 404 Pages for SEO
Table of Contents
- What Is a 404 Error?
- What Causes 404 Errors?
- Why 404 Errors Are Bad for SEO
- How To Find 404 Errors?
- How To Fix 404 Errors
Author: Anne Murigi, Content Writer
Every website has its fair share of 404 errors. It happens: you type in a URL, and instead of the page you expected, you see an error message that reads “not found.” But what are those pesky 404 pages really doing to your website’s SEO? In this post, we’ll discuss what 404 pages are and why they’re bad for SEO. Then, we’ll show you the best practices on how to deal with them in an SEO and user-friendly way.
What Is a 404 Error?
A 404 error can be defined as a HTTP status code that indicates that the client (i.e. your browser) was able to communicate with the server, but the server was unable to find the requested resource.
In other words, when a user tries to access a webpage that doesn’t exist, has been moved from the website or has a broken link, then the user will see a 404 error message.
This is what happens behind the scenes:
- The client’s browser sends an HTTP request to the server using TCP/IP protocols.
- In response, the server returns a HTTP status code of 200/404 as well as other headers like cookies and cache control.
- If there’s no content for that URL requested, then the server will return a 404 error code.
- The client’s browser then displays the corresponding message for that status code to the user, in this case, “404 Not Found”.
There are two main types of 404 errors: soft 404s and hard 404s.
What is a Soft 404 Error?
A Soft 404 Error is when a page returns a 200 HTTP status code, but has no content.
This means that the page has, in fact, been found by the server, it just hasn’t been coded correctly, so there is no content to display to the user.
This is problematic because it means that search engines like Google will continue to crawl and index the page.
What is a Hard 404 Error?
A Hard 404 Error is when a page literally doesn’t exist, this is when the correct HTTP status code i.e. “404” is returned.
What Causes 404 Errors?
The main causes of 404 errors include:
- Incorrect Linking – This is when other websites have linked to your website incorrectly. For example, if someone links to www.example.com/abcd instead of www.example.com/abc, then this will result in a 404 error being returned because the server can’t find the page /abcd.
- Misspelt URLs – Misspelt URLs will also cause 404 errors as the server won’t be able to find the correctly spelt version of the URL that you’re trying to access.
- Deleted pages – If pages on a website have been deleted (or moved without redirects being put in place), then any links to these pages will cause a 404 error.
- Renamed Pages – If a page has been renamed, any links pointing to the old URL will return 404 errors.
- Broken links – If any of the links on your pages are broken (i.e. going to a page that doesn’t exist), then users will get 404 errors when they try to click on them.
- Removed domains – If a domain has been removed from the hosting account, it may still be cached by search engines, so they could still be finding links to this website and returning 404 errors.
- Moved domains – If a domain has been moved to a different hosting account, any links to pages on the old site will cause 404 errors.
There are many other reasons why 404 errors can occur, but these are some of the most common.
Why 404 Errors Are Bad for SEO
There are a few reasons why having 404 errors on your website can potentially hurt your SEO performance:
Google May Think Your Site Is Broken
When Googlebot crawls a website and encounters 404 errors, it’ll assume that the pages don’t exist anymore and stop indexing them. This means that those pages will no longer show up in search results, which hurts your chances of getting traffic from Google.
It Looks Unprofessional
If users constantly come across 404 errors when trying to visit your site, they’re going to get frustrated and might eventually give up on trying to access it altogether. This not only doesn’t do you any good, but it also reflects badly on your business or website in general.
When other websites link to pages on your site, it’s a vote of confidence in your brand and content. Backlinks help you rank better in search results, which gives you more traffic. More importantly, it also increases your credibility with readers and customers, which can boost conversions. If these pages no longer exist on your site, you’re missing out on these benefits.
You Could Be Missing Out on Valuable Analytics
One of the biggest benefits to creating a website is having access to data on how your site is performing. If you’re not keeping track of your 404 errors, you’re missing out on valuable insights that can help you improve your site.
You Could Be Losing Potential Customers
If a potential customer comes to your site and finds a 404 error, they’re likely to leave and never come back. This is especially true if they can’t find what they were looking for on your site. In addition, if you have links to other sites that are broken, you could lose out on valuable traffic.
How To Find 404 Errors?
The first step in dealing with 404 pages is to find them.
There are a number of tools you can use to identify broken links, such as Google Search Console and Screaming Frog. However, Google Search Console is the easiest and most accessible.
Once you’ve logged in, click on Coverage and select the Excluded tab.
It’ll show you a list of all of the hard 404 errors (marked as Not found (404)) as well as any soft 404 errors (marked as Soft 404).
Click on this row to see a list of all URLs that return a 404 error.
How To Fix 404 Errors
Here are the best practices when it comes to fixing 404 errors with SEO in mind.
Create a Custom 404 Page
You can customise your 404 page to help visitors find what they’re looking for on your website.
What Should A Custom 404 Page Include?
Your custom 404 page should include:
- A helpful message letting visitors know that the page they’re looking for can’t be found.
- Links to important (and relevant) pages on your website – this helps users find what they’re looking for more easily.
- Any products, promotions that may be of interest to the user
- A call to action i.e. if a product is no longer available, you may want to include a simple form that allows users to enter their email address so that they can be notified when the product is available.
- A search bar
- Contact information
- Show off your brand personality i.e. you can include witty messages, graphics
Here are some examples of great custom 404 pages:
- Disney UK
Fix Broken Internal Links
When you have determined that an internal broken link exists, the next step is to fix it by replacing it with the correct URL.
To find broken internal links, you can use Ahrefs’ Site Explorer tool.
Site Explorer > yoursite.com > Outgoing links > Broken links
Once you’ve identified the broken links on your website, simply replace them with the correct URL.
Redirect the Broken URL to Another Relevant Page
If you have a page on your site that isn’t working anymore, you can implement a 301 redirect from the old page to a new, relevant page. This is a good way to keep people on your website and make sure they find what they’re looking for, even if the original link is broken. This also has the added benefit of passing any PageRank of the old URL, to the new URL.
To do this, you’ll need to edit your .htaccess file – this is a server-side file located in your root folder that tells browsers how to behave when they visit your site.
Within this file, you can add 301 redirects that will automatically send people to the new URL when they try to access the old one.
Find out more about how to implement 301 redirects in detail here.
As we’ve covered, there are many ways to deal with 404 errors. It really depends on your situation and what will work best for you. What’s important is not to ignore these errors, as they can have a negative impact on your SEO and user experience.
If you can help it, avoid letting users from seeing a 404 error page. Instead, redirect them to a relevant page or contact you so that they can find the information they need. If all else fails and the user has to see a 404 error page, make sure that it is optimised for SEO and usability to prevent any negative impacts on your website’s success.
More research articles
View more of our research.