Best way to do a redirect?

3 replies
Warriors,

What's the best way to do a redirect, if (a) I want to track that people are clicking on this page, and (b) I don't want Google to bite me.

1. Meta refresh page?

<META http-equiv="refresh" content="0;URL=http://www.URLtoGoTo.com">

2. PHP redirect?

<?php
Header("Location:http://www.URLtoGoTo.com");
?>

3. .htaccess file? I can do it, but I hate messing with this.

4. Cpanel?

#1 seems to have the benefit that I could add Google Analytics code to the page, and the pageviews would show up in Google Analytics. #2, #3, #4 don't seem to cover this, so I would have to use a separate adtracker script like AdTrackZ or Prosper2.

What do you recommend?
#301 #meta #php #redirect #refresh
  • Profile picture of the author vision2000
    I use Adtrackz for tracking the no of people clicking on a page. Google doesn't like meta refresh.
    {{ DiscussionBoard.errors[1744336].message }}
  • Profile picture of the author Istvan Horvath
    #1 should be out of question! G. WILL bite you - the method is used often by spammers, so don't use it.

    for #2 add this line, too:
    Header( "HTTP/1.1 301 Moved Permanently" );
    otherwise search engines might think this is a "temporary" redirect...

    I have to admit, never tried tracking clicks on a redirect
    Signature

    {{ DiscussionBoard.errors[1744339].message }}
  • Profile picture of the author Scott Million
    Originally Posted by archivefive View Post

    Warriors,

    What's the best way to do a redirect, if (a) I want to track that people are clicking on this page, and (b) I don't want Google to bite me.

    1. Meta refresh page?

    <META http-equiv="refresh" content="0;URL=http://www.URLtoGoTo.com">

    2. PHP redirect?

    <?php
    Header("Location:http://www.URLtoGoTo.com");
    ?>

    3. .htaccess file? I can do it, but I hate messing with this.

    4. Cpanel?

    #1 seems to have the benefit that I could add Google Analytics code to the page, and the pageviews would show up in Google Analytics. #2, #3, #4 don't seem to cover this, so I would have to use a separate adtracker script like AdTrackZ or Prosper2.

    What do you recommend?
    Shrink a link. Track it. Grow your business. | BudURL is a good way to go if you want to track clicks and keep it simple.
    {{ DiscussionBoard.errors[1744431].message }}

Trending Topics