how to delete pages properly

How to properly delete a page from your site

How to properly delete a page from your site

October 26th, 2015 – 13 Comments

When you delete a page (or post) from your site, you delete one or more URLs too. That old URL, when visited, will usually return a 404 not found error. But is that what you wanted? Maybe that page should be redirected somewhere. If not, and you deliberately deleted that content, serving a 410 header would actually be a better idea. This post explains the choices you have and how to make them.

Redirect or delete a page completely?

The first choice you have to make is whether or not the content you deleted has a proper equivalent on your site. Think of it this way: if I clicked on a link to the page you deleted, would there be another page on your site that gives me the information I was expecting? If that’s true for a specific page on your site for a majority of the people clicking on that link, you should redirect the deleted URL to that page.

In general, I’d advise you to redirect a page even when only a smaller portion of the visitors would benefit from that redirect. The reasoning is simple: if the other option is for all your visitors to get a page saying “content not found”, that’s not really a good alternative either…

Create a redirect

When you redirect that deleted page URL to another URL, make sure the redirect you use is a so-called 301 redirect. There are several types of redirects, but a 301 redirect is what’s called a permanent redirect. In doing so, Google and other search engines will assign the link value of the old URL to the URL you redirected the visitors too.

Optimize your site for search & social media and keep it optimized with Yoast SEO Premium »

Yoast SEO for WordPress pluginBuy now » Info

Delete a page completely (?)

If there is no page on your site with that information, you need to ask yourself the question: should I really be deleting that page? Or should I just make it better? If you decide to delete it nonetheless, make sure you send the proper HTTP header: a 410 content deleted header.

404 and 410 HTTP headers

The difference between a 404 and a 410 header is simple: 404 means “content not found”, 410 means “content deleted” and is thus more specific. If a URL returns a 410, Google is far more certain you removed the URL on purpose and it should thus remove that URL from its index. This means it will do so much quicker.

If you’re using WordPress and our Yoast SEO Premium plugin, the redirects module in this plugin is capable of serving 410 headers. We’ll make that easier to do when you delete a post or page in an upcoming release.

The problem with serving 410 content deleted headers is that Google’s support for it is incomplete. It will delete pages that serve a 410 from its index faster. Yet, in Google Search Console, Google will report 410s under “Not found” crawl errors, just like 404s. I’ve complained to Google about this several times but unfortunately they have yet to fix it.

Collateral damage when deleting a page

When you delete one or more posts or pages from your site, there’s often collateral damage. Say you deleted all the posts on your site that have a specific tag. That tag now being empty, its archive’s URL will also give a 404. Even when you handle all the URLs of those posts you deleted properly (by redirecting or 410ing them) the tag archive will still give a 404, so you should make sure to deal with that URL too.

Even when you didn’t delete all the posts in a tag, the tag archive might now have 5 instead of 12 posts. If you display 10 posts per page in your archives, page 2 of that archive will now no longer exist, and thus give a 404 error. These aren’t the biggest problems in the world when you delete one or two posts, but if you’re dealing with a Google Panda problem and because of that deleting lots of poor content, creating a lot of 404s like this can take your site down even further, so proceed with care!

Read more: ‘Which redirect should I use?’ »

13 Responses to How to properly delete a page from your site

  1. Koemsie Ly
    By Koemsie Ly on 4 November, 2015

    I have some problem with duplicated meta description in Google web master. I used to use 301 redirect from old page. Now, it show duplicated.

  2. scott graham
    By scott graham on 3 November, 2015

    I too use 301 most of the time for re direct but will keep the 410 in mind now.

  3. Robin Jennings
    By Robin Jennings on 3 November, 2015

    Deleting or deindexing tags can create a huge amount of error pages- thanks for highlighting this.

  4. Siva Thirulojan
    By Siva Thirulojan on 2 November, 2015

    Simple but very useful guide. I have seen many experts making mistakes in this process.

  5. Stephen
    By Stephen on 30 October, 2015

    Great post! I have been using 301 all the times.
    Now, I have another option 410. thanks

  6. Tyler
    By Tyler on 29 October, 2015

    Interesting. I pretty much always used a 301 but a 410 could be handy.

  7. Amit Ramani
    By Amit Ramani on 29 October, 2015

    In my case, we have an ecommerce site. We have products that are retired. Currently, I use the Redirect feature to redirect from a discontinued/retired product to an equivalent one.

    Is it possible to do the redirects if you have regular Yoast (not premium)?

  8. PACO
    By PACO on 29 October, 2015

    Is htaccess also a good option?
    Can you please explain us how to create a proper htaccess file?

  9. Neil Redfern
    By Neil Redfern on 29 October, 2015

    This is something I am working on right now, so I found this very useful. Thank you!

  10. Sheri
    By Sheri on 29 October, 2015

    I have recently gone through my site an deleted some pages. I know I should create 301 redirects for them, but at the point of sounding ignorant, I am completely clueless about how to (step-by-step) “create a 301 redirect”. Can anyone help me with this? It would be much appreciated!

  11. Phil
    By Phil on 29 October, 2015

    Thank you for this – I was just in Search Console trying to figure out how best to deal with deleted pages and saw the link to this post come through on your email!

  12. Karen Julia
    By Karen Julia on 27 October, 2015

    This is really helpful, thank you! I did not know about the 410 option!

  13. Samuele Valerio
    By Samuele Valerio on 26 October, 2015

    Many thanks for the tips about 410 delete page. I find it really usefull.

Check out our must read articles about Analytics