Answer the question
In order to leave comments, you need to log in
Server response with X-Robots-Tag for files only?
Can the server response Header set X-Robots-Tag "noindex"
only apply to files? For example .pdf, .doc.?
Or is it possible to do it for the page url? For example, for example.com/someurl
.
In all the examples that I found:
<Files ~ "\.(png|jpe?g|gif)$">
Header set X-Robots-Tag "noindex"
</Files>
Answer the question
In order to leave comments, you need to log in
You searched badly:
<IfModule mod_headers.c>
<If "%{REQUEST_URI} =~ m#blalabla#">
Header set X-Robots-Tag "noindex"
</If>
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question