There are two methods.
- You can store all your PDF files inside a directory and block that being index by bots
Code: Select all
User-agent: * Disallow: /pdf-directory/
- Block PDF file types (since we use $ at the end, this will block any URL that ends with pdf)
Code: Select all
User-agent: * Disallow: /*.pdf$
Code: Select all
User-agent: Googlebot