301 Redirect or 404 Error Pages?
4 mins read

301 Redirect or 404 Error Pages?

Google’s Gary Illyes answered a question about which is less bad: millions of 404 error pages or 301 redirects. Gary’s answer clarified how to think about each status code.

The question was simple:

“Which is less harmful: millions of 404 error pages or millions of 301 redirects where sold product pages redirect to the parent listing page?”

The answer was also simple, although it could have been more detailed.

This is Gary’s answer:

“404 status codes are completely harmless, as is 301.

You have to decide what is better for your scenario and fly with it.”

status codes

Gary uses the phrase “status codes” to refer to the 404 and 301 responses.

Both are responses from a server to a request (made by a browser or bot) for a webpage.

When a browser calls up a web page, it requests a web page from the server.

The server responds to the browser request with a message saying so status this request.

That’s why Gary named the codes 301 and 404 status codes.

Because they are responses (from server to browser), they are also called response codes.

Technically, however, they are status codes because the creators of the HTML standards, the World Wide Web Consortium (W3C), refer to them as status codes.

There are five types of status codes:

“1xx (information): The request was received, the process will continue

2xx (Successful): The request was successfully received, understood and accepted

3xx (Redirect): Further action must be taken to complete the request

4xx (Client Error): The request contains incorrect syntax or cannot be fulfilled

5xx (Server Error): The server could not fulfill what appeared to be a valid request.”

Error Pages/Error Codes

The question asked related to “404 error pages”, probably because they are commonly referred to as 404 errors.

But the pages themselves are not flawed.

What happens is that the request for missing webpages “cannot be satisfied”.

There was an error because the page was not found. However, the server only responds with status code 404 (page not found).

Frequent use of the word “error” in connection with 404 responses has led to the misconception that 404 responses are bad.

But that’s wrong, the 404 response is neither bad nor good, it’s just a page not found response.

According to W3C:

“The 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is unwilling to disclose that one exists.

A 404 status code does not indicate whether this lack of representation is temporary or permanent;…”

Another trusted and authoritative HTML resource, the Mozilla Web Docs, defines the 404 status code as follows:

“The HTTP 404 Not Found response status code indicates that the server cannot find the requested resource.

…A 404 status code only indicates that the resource is missing, not whether the absence is temporary or permanent.”

All of which explains why Gary Illyes said: “404 status codes are completely harmless…

How to choose between 301 and 404 response code

Gary also said that it’s up to the individual publisher to decide what works best for them.

Web pages are lost due to various reasons.

If the page is missing because two sites have been merged, a publisher can redirect old or outdated pages to the new, similarly themed pages.

However, if the pages don’t match a similar topic, those pages can become 404 replies stating that the page doesn’t exist.

One can use a 410 status code to indicate that the removal is permanent, but Google essentially treats 404 and 410 almost the same.

When in doubt, consider what works best for the user at the end.

For example, if you are merging a site on topic K with a larger site on topic AZ, it might make sense to do a one-to-one redirect to pages on the larger site related to topic D.

The remaining pages that do not have a one-to-one match can be redirected to the main category page for topic D on the larger site.

Or as Gary said: “You have to decide what is better for your scenario…

Check out the Google SEO office hours starting at 1:09 minutes:

Featured image from Shutterstock/Asier Romero