Many times you want to remove urls from google index. There can be many reasons for doing that. Some of the reasons are:
- A page has been deleted but it is still indexed in Google.
- Page is not deleted but you don’t want Google to index it. One example is search page.
- A page with some non-public data which got accidentally indexed by Google. You may want to remove it from Google index.
- Non existing pages on your site which could be result of some bad link on your site of or some external site. These can be found by looking at crawl errors in webmaster tools.
Here are the steps to remove urls from Google index:
- Click on “Google index” > “Remove URLs” to go to “Remove URLs” section in webmaster tools.
- Click on “Temporarily hide” as shown above. Note that earlier it used to be Remove Url. Google has made label change to emphasize that url will be temporarily removed.
/foo/bar/non-existing-page/or whatever url you want to remove in the box as shown above. Please note that the url you enter must meet the removal requirements. The easiest option is to add this url to either robots.txt or make sure you return HTTP 404 for the page.
If you are using apache then you can use following entry in apache config to return HTTP status code 404
RewriteRule ^/foo/bar/non-existing-url/$ - [R=404]
- Next you need to select request type. Typically for a single url you can select “Temporarily hide page from search results and remove from cache”.
In case you are removing a directory, you can choose “Remove directory” option. Remove directory request must be supported by robots.txt. I usually avoid removing a complete directory if the urls to remove set is small to prevent any accidental removal.
Once a removal request is made, Google takes sometime to remove your pages from the index. For me it has been mostly less than a day.
I think removing unnecessary pages from Google index is a good idea. This may help Google to index other pages on your site better.