Friday, May 18, 2012

How to Setup a 301 PHP Redirect

June 18, 2010 by admin  
Filed under Affiliate Marketing

To hide affiliate links or setup a redirect from an article directory you want to setup a 301 redirect php file that tells a browser to automatically go to a new page when they access your domain. This forwards to the affiliate link automatically!

You want to create a file called index.php with notepad or any other text editor and paste in the following code:

<?
Header( “HTTP/1.1 301 Moved Permanently” );

Header( “Location: http://www.yourdomain.com ” );

?>

Replace the http://www.yourdomain.com reference to the affiliate link you are promoting. Save this file and then upload it to your Hostgator or other Web hosting account via FTP. Make sure this file goes in the root folder for the domain you are working with if you are forwarding from the domain root. You can also use these redirects for individual links and have multiple versions for each and every affiliate link you want to redirect.

So now when people visit http://www.yourdomain.com they will automatically be redirected to the affiliate vendor page which is your affiliate tracking link so you can get credit for the sale. Pretty slick huh? The redirect method is the best way to use domains for article marketing and other situations where you want to hide your affiliate link. It makes your link look clean and professional and the matching URL with the keyword often increases clickthrough rates because it tells the user that this site is relevant.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Live
  • LinkedIn
  • MySpace
  • connotea
  • Diigo
  • E-mail this story to a friend!
  • MisterWong.DE
  • Mixx
  • Propeller
  • Twitter
  • Yahoo! Bookmarks

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

See the Niche Marketing Secret

Leave a Review

Have something to add about this topic? Leave your comment below...
and oh, if you want a pic to show with your comment, go get a gravatar!