Keeping pdf files from showing in search engines.

Permalink
I have a concrete 5 site with a page that requires a user login. On that page there is a link to a pdf file. How can I keep that pdf from getting picked up by search engines like google and bing, etc.

 
core77 replied on at Permalink Best Answer Reply
Writing "Disallow: /files" in your robots.txt will prevent all files to be indexed. Is this a solution for you?
ccsjoe replied on at Permalink Reply
I put the folder I had my files stored in into the robots.txt file and I will see if that works. Thanks.

Have one more question that maybe you have an answer to. Is there a way to prevent a file from being open based on whether a user is logged in or not. If someone knows the link to the file they can open it or download it outside of concrete 5. I want to protect a file for only authorized users.

I can put a password on the file but if I already have them logging in with a user/pw that is just another thing I have to setup somehow.