Tuesday, July 2, 2024 - 16:08

To remove pages from Google's index after you have removed them from your website, you need to follow several steps to ensure Google is informed and the pages are no longer indexed. Here’s a comprehensive guide to achieve this:

Step 1: Remove Pages from Your Website

Make sure the pages you want to remove are deleted from your website and that they return a 404 (Not Found) or 410 (Gone) HTTP status code. This informs search engines that the page no longer exists.

Step 2: Update Your Sitemap

Update your XML sitemap to reflect the changes. Remove the URLs of the deleted pages from your sitemap. If you use a module or plugin to generate the sitemap, make sure it regenerates the sitemap file.

Step 3: Submit the Updated Sitemap to Google

Submit the updated sitemap to Google via Google Search Console.

  1. Log in to Google Search Console:
  2. Select Your Property:
    • Choose the relevant property (your website) from the list.
  3. Submit the Sitemap:
    • Navigate to the Sitemaps section under Index.
    • Enter the URL of your updated sitemap and click Submit.

Step 4: Use the URL Removal Tool in Google Search Console

Use the URL Removal tool in Google Search Console to request the removal of the deleted pages.

  1. Navigate to Removals:
    • In Google Search Console, go to the Removals section under Index.
  2. Request Temporary Removal:
    • Click New Request.
    • Select Remove this URL only if you want to remove a single URL, or Remove all URLs with this prefix if you want to remove multiple URLs that share a common prefix.
    • Enter the URL(s) of the pages you want to remove and submit the request.

Step 5: Use Robots.txt to Block the Pages (Optional)

Although this method does not remove already indexed pages from Google, it can help prevent future indexing.

  1. Edit Your Robots.txt File:

    • Add Disallow directives for the URLs you want to block.

    Example:

    User-agent: * Disallow: /path-to-deleted-page/

  2. Submit the Updated Robots.txt File:
    • Go to the Robots.txt Tester tool in Google Search Console.
    • Test and submit your updated robots.txt file.

Step 6: Set Up 301 Redirects (Optional)

If the content of the removed pages has moved to new URLs, set up 301 redirects from the old URLs to the new ones. This helps preserve any search engine ranking and link equity.

  1. Edit Your .htaccess File (Apache):

    apache

    Copy code

    Redirect 301 /old-page-url /new-page-url

  2. Edit Your Nginx Configuration (Nginx):

    nginx

    Copy code

    location /old-page-url {    return 301 /new-page-url; }

Step 7: Monitor Google Search Console

Regularly monitor Google Search Console to check the status of your removal requests and to ensure that the pages are no longer indexed.

Step 8: Clear Caches

If you are using a caching mechanism, clear all caches to ensure that the changes are propagated.

Step 9: Check Indexing Status

Periodically check Google to ensure that the pages are no longer indexed. You can use the site: operator to check specific URLs.

site:yourwebsite.com/path-to-deleted-page/

By following these steps, you can ensure that the removed pages are de-indexed from Google, improving the overall SEO health of your site. If you encounter any issues or need further assistance, feel free to ask!