Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
2  
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
add comment

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

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

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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