Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
  • page rank 3 and page rank 5 for sale (In: I Want to Sell My Website)
  • Redirection of a page (In: Coding & Databases - PHP, ASP, Perl, etc.)
  • Featured Web Site Template

    Hundreds More at Free Site Templates.com!

    Web Site Partners
    Sponsored Links
    Jet City Software
     
    Whos Here ?
    Reflects user activity within the last 5 minutes
    Moderator(s): g1smd, Logan
    Forum Index · Search Engine Forums · Optimizing Your Website for the Search Engines · Google · How to 301 redirect for 1 https page to http?
    Member Message

    docprego
    Joined: Mar 19, 2006
    # Posts: 71

    View the profile for docprego Send docprego a private message

    Posted: 2006-Apr-01 18:33
    Edit Message Delete Message Reply to this message

    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.

    Thank you.



    docprego
    Joined: Mar 19, 2006
    # Posts: 71

    View the profile for docprego Send docprego a private message

    Posted: 2006-Apr-02 23:36
    Edit Message Delete Message Reply to this message

    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?

    I am so confused.



    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10465

    View the profile for g1smd Send g1smd a private message

    Posted: 2006-Apr-02 23:54
    Edit Message Delete Message Reply to this message

    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:

    User-agent: *
    Disallow /


    if you wanted all HTTPS files disallowed.




    docprego
    Joined: Mar 19, 2006
    # Posts: 71

    View the profile for docprego Send docprego a private message

    Posted: 2006-Apr-03 14:46
    Edit Message Delete Message Reply to this message

    Which is the preferred method?

    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?

    Thank you.





    Prowler
    Staff
    Joined: Aug 14, 2000
    # Posts: 1829

    View the profile for Prowler Send Prowler a private message

    Posted: 2006-Apr-03 15:32
    Edit Message Delete Message Reply to this message

    There is another simpler way to keep any search engine from indexing your pages served through https.

    Add something like the following in your header tag:


    Code: [copy]




    This code will serve no index, no follow for https connection and serve the normal index,follow as the robots directive.




    dudibob
    Joined: Oct 13, 2005
    # Posts: 1472

    View the profile for dudibob Send dudibob a private message

    Posted: 2006-Apr-03 15:44
    Edit Message Delete Message Reply to this message

    woa! that's genius Prowler smile



    Prowler
    Staff
    Joined: Aug 14, 2000
    # Posts: 1829

    View the profile for Prowler Send Prowler a private message

    Posted: 2006-Apr-03 16:02
    Edit Message Delete Message Reply to this message

    Thanks dudibob smile



    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2006-Apr-04 09:40
    Edit Message Delete Message Reply to this message

    don't use robots tag to follow and index. All you should need is this:


    Code: [copy]



    <meta name="robots" content="index,follow"> ... that just adds clutter to a header part of page as that setting is default by the engines.



    docprego
    Joined: Mar 19, 2006
    # Posts: 71

    View the profile for docprego Send docprego a private message

    Posted: 2006-Apr-05 02:24
    Edit Message Delete Message Reply to this message

    Curt thank you.

    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?





    Prowler
    Staff
    Joined: Aug 14, 2000
    # Posts: 1829

    View the profile for Prowler Send Prowler a private message

    Posted: 2006-Apr-05 05:03
    Edit Message Delete Message Reply to this message

    You will have to add the snippet of code given earlier in the header. ie just before you close </head> in the files Google has indexed.


    Forum Index · Search Engine Forums · Optimizing Your Website for the Search Engines · Google · How to 301 redirect for 1 https page to http?
    You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
    1. You have not yet logged in, or registered properly as a member
    2. You are a member, but no longer have posting rights.
    3. 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 cannot find this message, click here to Re-Send it.

    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.

    Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

    New posts Forum is locked
    © 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions