Website Error Pages

When you access a web page that the website cannot find, the server that powers that website usually returns a status code indicating that the server was unable to find the file requested. That status code returned when a file is not found can vary, but is most commonly a 404.

While returning a 404 status code is the standard way to handle a 404 error, there are several other ways to handle a not found error on your server. Some of these methods are acceptable and can support your SEO efforts, but others will create problems for your website.

Incorrect handling of not found errors causes confusion, either for a person visiting your website or for a search engine crawling your website (or, oftentimes, both). Without a standard 404 error, a person or a search engine might not understand that the server could not find a particular file.

If you trying to address a 404 error problem on your website, check out my guide to finding and fixing 404 errors.

What Are Not Found, 404, 410, & Soft 404s

Not-found (404) errors can happen for a variety of reasons, including a user misspelling a word in the URL or somebody adding a wrong link back to your website. You may have also recently adjusted URLs on your website and something went wrong with your redirects (link to redirect page). Regardless of the reason why somebody reached that “not found” error page, your website must handle the error correctly, especially for robots accessing the page as well as for people who reach the “not found” error.

Handling Errors Technically: 404 vs. 410

Correct handling begins by sending the appropriate HTTP response status code from the server to indicate to a robot that the URL requested is in error. A person never sees the response code but search engines and other automated services use this as a way to better understand the page and how to present this page to users.

The proper HTTP response status code is either a 404 (not found) or a 410 (gone). Using a 404 header response code is appropriate in almost all cases as it indicates quite clearly the page requested is unavailable. For example, if a visitor types in the wrong URL, the “not found” page is appropriate as that misspelled URL cannot be located. Note that a 404 doesn’t indicate why the page can’t be found, it only says it cannot be located at this time.

That brings us to the 410. If you specifically remove a page from your website, it is more appropriate to have that URL of the removed page return a status 410. Unlike a 404, a 410 indicates you specifically and intentionally removed this page. With a 410, it isn’t that the page couldn’t be found—instead, the page is gone. Using a 410 helps to clarify why the page is no longer available by stating the page was removed permanently and intentionally from the website.

That said, there is little real difference between the ways a 404 pages and 410 pages are treated by people visiting your website or Google. Decide what practice makes the most sense for your website and maintain that structure. For example, if you return a 410 response for blog posts you’ve removed, but a 404 response for all other content, continue that practice.

Difference Between Soft 404 and 404 Errors

One common problem encountered with website error messages is sending a non-error status response code on an error page. The default HTTP status response code for non-error pages is a 200, which means this page is “Okay”. If the default response code of 200 is used on an error page, instead of a 404 or 410 the error page is interpreted as a sign that there is nothing wrong with that particular page. This creates a “soft 404″—a page that looks like an error page, but doesn’t provide the appropriate response code to define this page as an error.

While most humans won’t be able to tell the difference between a soft 404 and a 404 error page, this can present a problem for automated programs accessing your website, like robots from search engines. Sending the incorrect error means robots don’t know to treat the error page as an error page. This can lead Google to indexing error pages (which you’d rather they not do) or wasting time crawling pages of your website you’d rather Google not look at.

Redirect Replaced or Moved Pages

If you’ve replaced an existing page with a new page or if you’ve moved a page to a different location, the page is not lost and you shouldn’t return a not-found error. Instead, you want users (people and bots) to find where the page now exists. For replaced pages, you want to send users to that new page’s location and for moved pages, you want to send users to the new location. When sending people to the new location, you want to communicate to search engines that this page has been permanently moved elsewhere. For these types of moved or replaced pages, you want to redirect the old URL to the new URL with a 301 status code. Along with sending a user from the old page to the new location of that page, the 301 status code tells the search engines that you’ve updated the content to a new location. (Learn more about 301 redirects.)

Defining The Most Common Broken Page Types

Standard 404

What It Is

The server returns a 404 status code, indicating the file requested was not found. A page is displayed explaining the requested file was not found.

Comments & Concerns

None; this is how broken pages should work.

Suggestions

Now, make sure your error page offers a good explanation of the problem along with suggestions of where the user should go next.

410 Variation

What It Is

The server returns a 410 status code, indicating the file requested was removed from the server. A page is displayed that explains the requested file was not found.

Comments & Concerns

The 410 status code is intended for pages that you have permanently removed from your website. If the removal is temporary, or might be temporary, use a 404 status code instead of a 410 status code.

Suggestions

Since you are returning a correct header, ensure your broken page offers a good explanation of the problem (the file was removed), along with suggestions on what to do next (related links, information to contact you, etc.).

Soft 404

What It Is

The server returns a 200 status code, indicating that this file exists (even though it does not exist). A page is displayed explaining the requested file was not found.

Comments & Concerns

If the content indicates that the file requested is not available, this is generally okay though not ideal. Soft 404s can cause some confusion, especially if the content on the page displayed doesn’t make it clear that the file requested is not found.

Suggestions

At minimum, ensure your content clearly explains that the file requested is no longer available on your site. Ideally, you should configure your server to return a 404 status code or a 410 status code on your website’s broken pages.

Redirect To Standard 404 (Or 410)

What It Is

The server returns a 301 status code, indicating the file has moved to a new location. The server redirects the user to that new location, and the new location returns a 404 (or 410) status response code.

Comments & Concerns

This type of broken page has two problems:

  1. The browser’s address bar does not display the actual broken link to the end user. This makes it harder for people who share your content or link to your content to know what link was actually broken. As a result, those people are less likely to correct their mistake by updating the broken link.
  2. This type of broken page provides conflicting signals. With the 301 status code returned first, you are saying that this file still exists, even though it doesn’t. Then, you are saying this file does not exist.

Suggestions

Disable the redirect and use a standard 404. With a standard 404, you show people the broken link in the browser’s address bar. Plus, with a standard 404, you are only sending one signal about the 404 error.

Redirect To Soft 404

What It Is

The server returns a 301 status code, indicating the file has moved to a new location. The server redirects to that new location, and the new location returns a 200 status code, indicating that file exists at the new location.

Comments & Concerns

This is similar to the “Redirect to Standard 404” type, however the result is that your server indicates the broken file is not broken. A redirect to a standard 404 is better because it at least indicates something failed.

Suggestions

Change the response code on the new location to return a 404 status code. This makes it clearer that the file is broken. The better way to fix this is by disabling the redirect and showing a standard 404 instead.

Redirect to Home Page

What It Is

The server returns a 301 status code, indicating the file has moved to a new location. That new location is your website’s home page. As a result, a visitor who clicked on a broken link to your site arrived at your home page.

Comments & Concerns

This type of broken page indicates that your home page is your error page. The home page and your error page serve two distinct purposes; you never want your home page to be confused with your error page.

Suggestions

If you have to redirect your 404, redirect it to a page that specifically indicates the requested file is unavailable. Ideally, do not redirect at all and instead use a standard 404.

Home Page As The 404 Error (No Redirect)

What It Is

When a visitor encounters a broken link, that visitor sees your home page. The server does return a 404 status code indicating that the file accessed is not found. However, because your website’s home page is used as the error page, there is no text presented to the user indicating that the file was not found.

Comments & Concerns

With this type of broken page, you are saying your home page is your website’s not found error page. Like with the “Redirect to Home Page” type, you never want to confuse your home page and your error page.

Suggestions

Create a different page for people to see when they encounter a not found error. Return that broken page instead of your home page when a user encounters a broken link.

Home Page As The Soft 404 Error (No Redirect)

What It Is

Like with the “Home Page As The 404 Error (No Redirect)” type, this type of broken page returns the home page when somebody encounters a broken link. However, the home page returns a 200 status code, indicating that nothing is broken. This confuses users who are not informed they have reached an error. It also confuses search engines who cannot detect that this page is broken.

Comments & Concerns

This broken page type allows your home page to display on an infinite number of links, opening you up to problems with duplicate content. Essentially, you are saying that yoursite.com/some-broken-link is a valid page on your site and that the valid page located at that link is a duplication of your home page.

Suggestions

This type of broken page is highly problematic and can lead to extensive duplicate content problems. Among other issues, duplicate content problems can negatively impact your search performance.

To fix this, create a different 404 error page for your site and have that page returned by your server when users encounter not found errors on your site.

Forbidden 404

What It Is

A 403 status code is returned indicating the page is forbidden (usually due to a permission issue).

Comments & Concerns

A not found error message and a forbidden message are two different messages to communicate. The website’s not found error is distinct, and should be treated as such.

Suggestions

Change the response code to a 404 or 410 status code.

Server Error 404

What It Is

A server-level error status code (a number larger than 500) is returned when a broken page is accessed on your site.

Comments & Concerns

A server-level error is different than a not found error, and the two should not be confused.

Suggestions

Change the response code to a 404 or 410 status code.

Handling Errors For People

Along with properly displaying the error to search engine robots, you also want to make sure that people who encounter the error clearly understand an error occurred. As well, you want to make sure people stay on your website instead of leaving your website since the page they were seeking was not found. This means you want to clearly state that an error occurred and give visitors a way to continue beyond the error page (preferably to another related page on your website).

For more about handling errors for humans, please review my guide to creating delightful error experiences.

Resources & Helpful Information

Technical SEO Services

Want help improving your website’s technical SEO factors? Contact me today to discuss how we can help review and improve your current technical structure.

Prefer a more DIY approach? Order Tech SEO Guide, a reference guide to help you address the technical SEO  issues on your website. Order now at Amazon.