Google friendly way to redirect

Discussion in 'Google' started by stellar, Dec 22, 2006.

  1. #1
    Hi all,

    I have an affiliate site and I am setting up some simple tracking, using PHP. When the user clicks on a merchants product to buy it from the merchant site, I send them to a simple tracking page first. The tracking page inserts the keyword that the user used to find my site, the product they have selected, and a few other bits and pieces and then sends them to the merchants site.

    The question is, what is a google friendly way to redirect a customer in cases like this? I have heard that using a meta refresh is a big no no. So I am planning on using php's header() function in the tracking page. ie header ("Location: merchant url").

    Does anyone know if google has a problem with this method?
     
    stellar, Dec 22, 2006 IP
  2. abixalmon

    abixalmon Well-Known Member

    Messages:
    378
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    120
    #2
    I think this way should be google friendly...
     
    abixalmon, Dec 22, 2006 IP
  3. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    301 re-direct.
     
    amaze, Dec 22, 2006 IP
  4. NetMidWest

    NetMidWest Peon

    Messages:
    1,677
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #4
    This should work for you:
    header("HTTP/1.0 301 Moved Permanently");
    header("Location: http://www.example.com/filename");
    Code (markup):
    Sending the location alone will send a '302 Found' status code, which does not seem to be a problem with Google anymore (they are getting crawled, but not indexed as they have in the past). It is a best practice to use a 301 status code.

    Check your staus codes here.
     
    NetMidWest, Dec 22, 2006 IP
  5. stellar

    stellar Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    But a 301 re-direct is for a permanent redirect. This is not permanent!

    All the links to the merchant sites will be passed through the tracking page, so the destination url will be constantly changing. Therefore, surely 301 re-direct is not an option here?!?
     
    stellar, Dec 22, 2006 IP
  6. KC TAN

    KC TAN Well-Known Member

    Messages:
    4,792
    Likes Received:
    353
    Best Answers:
    0
    Trophy Points:
    155
    #6
    Using PHP header is fine :)

    I have been using this method in some of my affiliate sites.
     
    KC TAN, Dec 22, 2006 IP