Is a 404 redirect a legitimate redirect?

I have a situation where some users may get to error pages, from links, etc. In most cases, I can determine the correct page to display, so I want to redirect to the correct URL.

Whether 301 redirection is appropriate in this case. 301 means "Move constantly," but in this case the document was not there in the first place. Is it permissible to set the 404 Not Found header and then redirect to the correct URL?

+4
source share
8 answers

I would use 301. Moved permanently because it reports that access to the page does not exist and never will be. If anyone has a link to this page, they know that they need to update the link.

+3
source

Beware of 301, as it means "constantly", for example. even if you use this URL in the future, search engines may want to ignore it - because they โ€œknowโ€ the content on that particular URL has been moved โ€œforeverโ€.

Use 303 See Other if you want to redirect, or - better - display 404 and a friendly error message that refers to the preferred content.

+10
source

I think that casting the user to the page type "you mean" would be my advantage. If you have no suggestions for the content "you meant", then give them a real error page and 404 of it. Otherwise, leave the page as status 200 and let the user click.

I tend to use 301s to redirect previously known and well-established URLs that have changed for some reason. The reason I'm worried about automatic redirects is because a flaw in your discovery algorithm can adversely affect SEO.

+4
source

301 is great when you are pretty sure you know what the URL should have been. This is the best solution for both browsers and SEO when they encounter broken inbound links.

However, 3xx is not suitable as a general answer not found on the page. There are several sites that always 302 you / instead of returning 404, but this is very bad, which can easily break the material.

+2
source

I know that 404 may include a redirect header, but that sounds really bad to me.

+1
source

you cannot redirect the 404 document. maybe just display the 404 page and suggest the correct urls. 404 means error. I know that Google will not be happy to see these links. :)

0
source

You can only respond once to an http request - you cannot send 404 and then send 301. So you are stuck with 301, I think.

0
source

Either use 301, or redirect, or use 404, and display a message in the line "I think you mean" this URL "instead, refresh your bookmarks" (and do not redirect).

0
source

All Articles