WordPress.org

Support

Support » Miscellaneous » x-robots noindex in .htaccess for specfic directories

x-robots noindex in .htaccess for specfic directories

  • Hello,

    I am trying to figure out how to get search engines to not archive or index specific secure categories using .htaccess. I can’t seem to find the method for doing entire slugs/urls.

    As an example, here’s preventing a single file (your sitemap.xml), so how do I remove a directory called http://www.myurl.com/secure?

    <IfModule mod_rewrite.c>
    <Files sitemap.xml>
    Header set X-Robots-Tag “noindex”
    </Files>
    </IfModule>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘x-robots noindex in .htaccess for specfic directories’ is closed to new replies.
Skip to toolbar