When you delete a page (or publication) from your site, you also delete one or more URLs. This old URL, when visited, will typically return a "404" error, which is not best for Google or your users. Is this really what you wanted? You can redirect this deleted page to another page or, if you really want to delete the contents of your site, providing a 410 header which is actually a better idea. This article explains the choices you have and how to implement them.

Delete image

Redirect or delete a page completely?

The first thing you need to determine is whether the contents that you deleted has an equivalent somewhere on your site. Think about it this way: if I clicked on a link to the page you removed, would there be another page on your site that would give me the information I was looking for? If this is the case for most people following the link, you should redirect the removed URL to the alternative page.

In general, I would advise you to redirect a page even when only a few visiteurs would benefit from it. The reasoning is simple: if the other option is that  all your visiteurs are sent to a page “contents not found”, it’s not really a great alternative either…

Create a redirect

It exists  several types of redirectsbut a redirection 301 is what is called a permanent redirect. This is what you should use when you redirect this deleted page URL to another URL. Using a 301 redirect means that Google and other search engines will assign the old URL's link value to the URL you redirected to. visiteurs.

Delete content completely

If there really isn't another page on your site that has this information, you need to consider whether it is better to delete it or keep it and improve it. But if you are absolutely sure you want to delete it, be sure to send the correct HTTP header: a "410" header which stands for "deleted content".

404 and 410 HTTP headers

The difference between a 404 header and a 410 header is simple: 404 means "content not found", 410 means "content removed" and is therefore more specific. If a URL returns a 410, Google knows that you removed the URL on purpose, so it should be removed from its index much earlier.

The problem with providing 410 headers for deleted content is that Google's support for these headers is incomplete. Of course, pages that serve a 410 will be removed from its index more quickly, but Google Search Console will report 410s under error errors.analysis “Not found”, just like 404s.

404 or 410

Collateral damage when deleting a page

When you delete one or more posts or pages from your site, there is often collateral damage. Suppose you have deleted all the articles on your site with a specific tag. Since this tag is now empty, its archive URL will also give a 404 error. Even if you handle all the URLs of the posts you deleted correctly (by redirecting or modifying them), the tag archive will still give a 404, so you need to make sure to deal with that url as well.

Even if you haven't deleted all the articles from a tag, the archive can now contain 5 articles instead of 12. If you display 10 articles per page in your archive, page 2 of this archive will no longer exist and will generate a 404 error. These are not the biggest problems in the world when you delete one or two messages, but if you are dealing with a problem with Google Panda and because of that, delete  beaucoup poor content, create a lot of 404 error on your site. even further, so proceed with caution.