how to delete pages properly

How to properly delete a page from your site

How to properly delete a page from your site

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.

Did you know Yoast SEO Premium has an awesome redirects manager that makes the redirection of deleted posts a breeze? Try it out!

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

Yoast SEO: the #1 WordPress SEO plugin Info

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.

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, therefore, 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. The redirects manager is the perfect tool for working with redirects. It automatically asks you what you want to with a certain URL when you delete it or change the permalink. You can set any type of redirect and it even ties into Google Search Console, so you can fix errors directly from the WordPress backend.

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.

Page you want to delete

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? »

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

  1. alexwood4512
    alexwood4512  • 10 months ago

    Thanks for sharing article. To delete a page from website is not easy as it looks. I have deleted a page and applied 410 redirect but still webmaster shows page not found errors.

    Please let me know if there is any solution.

  2. marketingjob
    marketingjob  • 10 months ago

    We work with a job board site and the expired jobs oportunities always put us in a delicate position in terms of SEO. Analyzing the type of redirect we give is always a challenge, as this can compromise positions won on Google.

  3. phasethreegoods
    phasethreegoods  • 10 months ago

    Great article, there’s so much more to deleting a page than just wiping it off the dashboard. It’s also important that *if* you opt for a 404 page, it contains some kind of prompt that helps people reach alternative, useful sections of the website. Too often I see the defeatist ‘404 not found’ message with nothing else to help users. Why not include links to cornerstone content, or a search bar as rightfully do? Little things to help the experience will really enhance users’ enjoyment of the website.

Check out our must read articles about Analytics