1

Google seems to have many pages in its index that I deleted years ago. My site currently has only the home page at example.com/index.html. What do I do in Apache to permanently remove all those deleted pages from the Google index?

2
  • Google typically deletes deleted pages from its index automatically. There must be something weird about your site so it's a Google can't see that they're deleted. Do you allow Googlebot to crawl deleted URLs? Are those URLs disallowed in robots.txt? Do the deleted URLs return "410 Gone" or "404 Not Found" status? Sep 13 '20 at 9:35
  • 3
    How do you know those pages are in Google's index? Does Google say so in Google Search Console? Do they show up in the search results for keywords that used to be on them? Do you see them in a Google site:example.com search? Sep 13 '20 at 9:43
1

Two things you want to do.

  1. At a server level, setup 301 redirects (if you want your visitors to be redirected to your homepage) or 404 responses (if it doesn't matter that your visitors see a 'page not found' message). Either individually for each page, or setup a sitewide rewrite rule to catchall
  2. Log into your Google Search Console account and request the pages be removed from the index.

Don't forget to do this in Bing Webmasters also.

3
  • 1
    You shouldn't set up redirects for you for URLs that have been removed. You should configure them to show 410 gone status. Sep 14 '20 at 12:30
  • @StephenOstermiller fair call. It depends I guess. I've amended the response to reflect your feedback.
    – RedWebMan
    Sep 16 '20 at 23:25
  • Redirecting content to the home page is not good SEO or user experience. Google treats home page redirects as "soft 404" errors, so there is no SEO benefit from implementing them. Users are better served with an error message that a redirect to content that isn't at all what they were actually looking for. Sep 17 '20 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.