WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Robots Meta] How to block SSL site in robots.txt (2 posts)

  1. phatride
    Member
    Posted 4 years ago #

    Is there a way to block SSL / https site using this plugin? What would I put in the robots.txt file to stop the search engines from seeing the https site?

    Thank you

  2. staze
    Member
    Posted 3 years ago #

    You can do this with .htaccess.

    Basically, you have a separate robots.txt for https, and with mod_rewrite in .htacess, you do something like:

    RewriteCond %{HTTPS} on
    RewriteRule ^/robots.txt$ robots.ssl.txt [P]

    This will basically point any HTTPS queries for robots.txt to the robots.ssl.txt, in which you can put:

    User-agent: *
    Disallow: /

    That'll prevent indexing on HTTPS.

Topic Closed

This topic has been closed to new replies.

About this Topic