Developer forum

Forum » Development » Add no index to pdf files

Add no index to pdf files

Jose Caudevilla
Reply

Hi:

 

I have a website that contains pdf links to products info.

This website is indexing the pdf files despite of the restriction being configured in the robots.txt.

The SEO consultant has recommended adding a no index in the pdf sources.

Searching i found that the way to do it is adding the following code in the Web.config

  <system.webServer>
  <rewrite>
    <outboundRules>
      <rule name="X-Robots-Tag: noindex to .pdf">
        <match serverVariable="RESPONSE_X_Robots_Tag" pattern=".*" />
        <conditions>
          <add input="{REQUEST_FILENAME}" pattern="\.pdf$" />
        </conditions>
        <action type="Rewrite" value="noindex"/>
      </rule>
    </outboundRules>
  </rewrite>
</system.webServer>

 

Adding this code, Google still indexing the pdf files and blocking them in the robots.txt

Is there any other way to put a no index in pdf files?

 

Regards,

Jose

 


Replies

 
Nicolai Pedersen
Reply

I think that is a Google question - and not a Dynamicweb one....

If the files are already indexed it can take a lot of time to dissappear, if ever.

 
Kevin Steffer
Kevin Steffer
Reply

I think maybe you can request URLs to be remove from the Google index via Google's Webmaster Tools

 

You must be logged in to post in the forum