301 Redirect or “404 Error Pages”?

301 Redirect or "404 Error Pages"?

Gary Illyes of Google answered a question about which is less worse to use, millions of 404 error pages or 301 redirects. Gary’s answer cleared the air about how to think about each status code.

The question was simple:

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

The answer was also simple, although it could have gone into more detail.

Here is Gary’s response:

“404 status codes are completely harmless, and so is 301.

You have to decide what’s best for your scenario and fly with it.”

Status codes

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

Both are responses from a server to a request from a web page (which was made by a browser or bot).

When a browser goes to a web page, what it does is request a web page from the server.

The server responds to the browser’s request with a message that communicates the status of that request.

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

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

But technically, they are status codes, because the creators of the HTML standards, the World Wide Web Consortium (W3C), they are referred to as status codes.

There are five types of status codes:

“1xx (Informative): Request received, processing continued

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

3xx (Redirect): More action is required to complete the request

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

5xx (Server Error): The server was unable to fulfill an apparently valid request”

Error Pages/Error Codes

The question asked was about “404 error pages”, probably because it’s commonly called 404 errors.

But the pages themselves are not wrong.

What is happening is that the request for missing web pages “cannot be fulfilled”.

There is an error where the page page is not found. But the server just responds with a status code, 404 (page not found).

The common use of the word “error” to refer to 404 has led to the mistaken belief that 404 responses are bad.

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

According to the W3C:

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

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

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

“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 this explains why Gary Illyes said that “404 status codes are completely harmless…”

How to choose between 301 and 404 response code

Gary also said that the individual publisher should choose what works best for them.

Web pages disappear for various reasons.

If the page is missing because two sites have merged, a publisher can 301 redirect old or outdated pages to new pages that have a similar theme.

But if the pages don’t have a similar topic match, those pages can become 404 responses, saying the page is absent.

A 410 status code can be used to indicate that the removal is permanent, but Google basically treats 404 and 410 pretty much the same.

In the end, when in doubt, think about what works best for the user.

For example, if you’re merging a site that’s about topic K with a larger site that’s about topic A – Z, it might make sense to individually redirect to pages on the larger site that are about topic D.

All other pages that do not have a one-to-one match can be redirected to the main category page of topic D on the larger site.

Or as Gary said, “You have to decide what’s best for your scenario…”

Watch the Google SEO office hours at the 1:09 minute mark:

Featured image by Shutterstock/Asier Romero



Source link

You May Also Like

About the Author: Ted Simmons

I follow and report the current news trends on Google news.

Leave a Reply

Your email address will not be published. Required fields are marked *