How to properly delete a page from your site

Whenever you delete a page (or post) from your site, you also delete one or more URLs. That old URL, when visited, will usually return a ‘404 not found’ error, which is not the best thing for Google or your users. Is that what you really wanted to happen? You could redirect that deleted page to another page, or maybe – if you really want the content gone from your site – serving a 410 header would actually be a better idea. This post explains the choices you have and how to implement 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 for synonyms and related keywords and prevent broken pages on your site with Yoast SEO Premium! »

Yoast SEO: the #1 WordPress SEO plugin Info

Redirect or delete a page completely?

The first thing you have to work out is whether or not the content you deleted has an equivalent somewhere else 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 looking for? If that’s true for most of those following the link, you should redirect the deleted URL to the alternative page.

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

Create a redirect

There are several types of redirects, but a 301 redirect is what’s called a permanent redirect, and this is what you should use when you redirect that deleted page URL to another URL. Using a 301 redirect means Google and other search engines will assign the link value of the old URL to the URL you redirected your visitors to.

Deleting content completely

If there really is no alternative page on your site with that information, you need to ask yourself whether it’s better to delete it or keep it and improve it instead. But if you’re absolutely sure you want to delete it, 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 therefore more specific. If a URL returns a 410, Google knows for sure you removed the URL on purpose and it should, therefore, remove that URL from its index much sooner.

Our Yoast SEO Premium plugin for WordPress has a redirects module which lets you set 410 headers. The redirects manager is the perfect tool for working with redirects, automatically asking you what you want to do with a URL when you delete it or change the permalink. You can set any type of redirect and it even connects to 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. Sure, it will delete pages that serve a 410 from its index faster, but Google Search Console 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  • 12 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  • 1 year 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  • 1 year 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 yoast.com rightfully do? Little things to help the experience will really enhance users’ enjoyment of the website.


Check out our must read articles about Analytics

Tools to improve your online marketing campaign

Take your online marketing to the next level with these easy-to-use and insightful online marketing tools to help you optimize your site!

Read article »

Tracking your SEO with Google Analytics: a how-to

How do you start tracking your SEO? In this how-to guide, we'll explain how to track your SEO with Google Analytics!

Read article »

Twitter Analytics: stats for your tweets

Twitter Analytics can help you set up and maintain the right Twitter strategy. We'll explain what can be learned from Twitter Analytics.

Read article »