Google has this link coming up as my search result:
"https://www.mysite.com"
I think it is causing me to have issues with my site losing all of its indexed pages.
Is there a piece of code I could put in my .htaccess file that will redirect only that page using a 301 redirect to "http://www.mysite.com?"
I do not want my other secure pages affected as they are used for shopping cart functionality. I would like to disable all future indexing of https pages but want to be careful that I do not 301 redirect other secure pages which need to remain secure.
G1SMD : you replied on another thread the following:
----------------
You can get rid of the https:// pages from their index by serving a different robots.txt file for those, and that file will simply have this in it:
User-agent: *
Disallow: /
The configuration for serving a different robots.txt file for http and for https is yet another setting in the .htaccess file.
---------------
The problem is that I asked tech support at my host how to do this and they told me that both http and https pages use the same directory so I should only need 1 robots.txt file. How am I supposed to make 1 robots.txt file work?
You add a command to the .htaccess file that tests whether THE_REQUEST is a HTTP request or is a HTTPS request and then serve the appropriate file.
If you have PHP scripting available you could do it there too. Make it such that .txt files are also parsed as containing PHP scripts, and then have a script in the robots.txt file which detects the REQUEST and then writes out the correct response; in the case of the HTTPS request it would be:
Is there anywhere that I can see the code I need to add to the .htaccess file to do this?
One more thing, Google only indexed 1 of my pages as https, the home page. Does it make sense to use a 301 redirect to drop it out of their index or is the robots.txt method the way to go? Will that page drop out of Google using only the robots.txt method?
Where do I insert this code? I use OS Commerce which is written in php. I know Prowler said to add it to the header code, but I do not know where to do this and to which pages?
Also will this solve the problem in that Google already has the https version of my homepage indexed? Will this cause Google to drop already indexed https pages or do I need the 301 redirect for that?
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
You have not yet logged in, or registered properly as a member
You are a member, but no longer have posting rights.
This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.