Can I disallow https pages from robots.txt

by 6 replies
8
Hi,
I tried searching the web but could not find an answer to it.
The problem I am facing is that my site opens with https:// for some reason I dont know why which it should not.
And google has indexed some author pages of the wordpress site starting with https://

How do I block https page from being indexed
will the code
Disallow:https://
work in robots.txt
#search engine optimization #disallow #https #pages #robotstxt
  • Do you have a cert? If so why don't you simply use mod_rewrite for your https requests?
    • [1] reply
    • Thanks for the reply sarged2 we have brought ssl services but we are not implementing it on any of the pages yet, it is just a service site. We are not selling anything so ssl pages are not needed.

      should i redirect https pages to http ?
      • [1] reply
  • Basically yes, each page should have only one connection method.
    In other words, all the pages should be either https or http. And if someone makes a mistake within a protocol, the apache would automatically redirect the page using the right protocol. If you don't set these rules you allow for the ambiguity which basically leaves it up to search engines and users.
    For example, you could use https for your pages that need to be secured, and http for the common pages that do not need any encryption, like homepage, etc.
  • Thank you sarged2 I also read some where that I can do this by making some changes in the httpd.conf file, but I am not sure which line to edit, do you have any idea about it.
    Thanks for the htaccess code
  • I think you might have moved all the files of http in to https folder,so then remove all the files and folders from it which enables at the same time, place the below code in .htaccess file:

    RewriteCond %{HTTPS} on
    RewriteRule ^(.*)$ http://yoursite.com/$1 [R=301]
    • [ 1 ] Thanks

Next Topics on Trending Feed