Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to change HTTP header? (in order to prevent PDF from being indexed)

Discussion in 'Troubleshooting & How-To's' started by white-k, Apr 11, 2016.

  1. white-k

    New Member

    Joined:
    Apr 11, 2016
    Messages:
    1
    Likes Received:
    0
    I want to prevent a PDF on my wordpress-site from being indexed by Google. I found a page describing that the only way to do it is "to use the HTTP X-Robots-Tag response header". But how/where do I do that on my wordpress site?


    Here is what the page discussing it says (this forum won't allow me to link to it):
    "
    To prevent your PDF file (or any non HTML file) from being listed in search results, the only way is to use the HTTP X-Robots-Tag response header, e.g.:
    X-Robots-Tag: noindex
    robots.txt does not prevent your page from being listed in search results.
    What it does is stop the bot from crawling your page, but if a third party links to your PDF file from their website, your page will still be listed.
    If you stop the bot from crawling your page using robots.txt, it will not have the chance to see the X-Robots-Tag: noindex response tag. Therefore, never ever ever disallow a page in robots.txt if you employ the X-Robots-Tag header. More info can be found on Google Developers: Robots Meta Tag."​
     
    #1

Share This Page

Web Hosting