What the heck is 301 and should I use it instead of a 404 for deleted pages?
First let's start with a definition:
A 301 is a server response, that a page has been moved. This works for example, if you have an update page with new info, but still related to content. For example if you had an old page about pricing plans and wanted to now redirect them to a new page. These are usually one of, or a handful of changes.
A 404 is a server response that a page is gone, as in removed from the website. This response will notify the crawler from a search engine, such as Google to drop this page from their index.
Routes are a a way within Vanilla (among other things) to allow you to add a redirect
Current situation
There have been lots of questions coming from customers about redirecting large amounts of old content to their homepage, rather than correctly telling Google the page is gone (404)
This is bad practice for a couple of reasons.
The 301 would not be relevant as you are sending hundreds of pages to homepage, and this is something which Google frowns upon. As they note in Google Webmaster tools: "When you remove a page from your site, think about whether that content is moving somewhere else, or whether you no longer plan to have that type of content on your site. If you’re moving that content to a new URL, you should 301 redirect the old URL to the new URL—that way when users come to the old URL looking for that content, they’ll be automatically redirected to something relevant to what they were looking for. If you’re getting rid of that content entirely and don’t have anything on your site that would fill the same user need, then the old URL should return a 404."
There is even a case of potential Google penalty of redirecting hundreds of pages to a single page.
Furthermore, Routes were not intended to be used in this way and could have a performance issue for customers.
"Also keep in mind that we parse through routes on every page load, so by adding a bunch of redirects we are also adding overhead. It's just a bad practice all together to redirect deleted content to the homepage." (per @linc and @franciscaisse )
If people want to expedite removal from Google index, you can use this too: https://www.google.com/webmasters/tools/removals
At Vanilla we follow best practices from Google, and will not deviate to other techniques. in short:
A 301 redirect for deleted pages doesn't make sense. A redirect tells a user and search engines a page has moved and directs them to the new correct page or URL. That is not the case here. A 404 error is the proper response. The 404 error pages do not affect your ranking.
Let me know any questions...
Comments
-
I should add this precision. In a perfect world, we would send a 410 server code (which is page is gone), but that would require for us to be able to distinguish pages that existed that are gone vs, a page not found, and would be more costly/time consuming as an action for the edge cases. Nonetheless, I mention it in case it is asked
1