Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Google has cached 1000s of PDFs from my website which shouldn't be public. I have updated my headers, but need to remove the existing Quick View cache.

The Google webmaster tool allows me to remove them one by one - however, this clearly isn't practical given the quantity of files to be removed.

Does anyone know how I can batch remove PDFs from Google cache? Ideally I'd like to a way to remove everything that matches "site:mysite.com *.pdf"

share|improve this question

migrated from stackoverflow.com Aug 15 '12 at 15:05

This question came from our site for professional and enthusiast programmers.

Quick google search indicates that it's not possible to batch remove using google API, you have to cobble together your own script that removes links one by one – Egor Aug 14 '12 at 16:11
@Egor That's what I feared... thanks for replying – laura Aug 14 '12 at 16:32

Seems like you've already figured out how to request removal of a single URL, which is obviously out of the question here. The second step in that process also lets you request removal of an entire directory, if the file URLs are predictable in that particular manner. (If you have thousands of PDFs, I'd hope they're at least somewhat organized.) If not, you're pretty much out of options, unfortunately.

share|improve this answer
+1 good & simple answer with links and all – alfasin Aug 15 '12 at 22:14

If the files "shouldn't be public" then they should be on the public internet. You can remove the files from Google listings (via robots.txt and other methods), but if the files are still there then anyone can still download them.

You should keep them behind some kind of authentication. For example, move the files out of the public web directory and serve them from a script that checks if the user is valid first.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.