ADVERTISEMENTS
  • Aida Jolie
  • JonLee
  • Site Hoppin


  • ADVERTISEMENT
  • Text Link Ads


  • ADVERTISEMENTS
    Rolex Daytona Rolex Daytona Rolex

  • Sponsored Ads

  • Recent Readers

PHP Redirect for Affiliate Ads

There are number of reasons that you should be using PHP redirects for your affiliate ads. Redirects are nothing new really and bloggers have been using this method to mask their affiliate URLs for some time now.

Why exactly would a blogger want to hide an affiliate ad anyway? Just a few reasons; maintain site integrity, load speed, prevent search engine penalization, keep code clean from complex affiliate javascript, domain consistency, maintain affiliates one sub-directory, and insure that your site receives credit for the given resource.   

A few methods can be used to accomplish the redirect Derek Beau explains how this can be down with one file and Cashquest offers a way to completely hide all affiliate evidence. The method that I have chosen to give details on is simplistic and the most widely used redirect in the blogosphere.


 
PHP Redirect File Steps:
Creating your PHP redirect file is really quite simple and by doing this you will be able to link to any product without revealing the URL source by masking it with your site name and path.

  • Open notepad copy this code and paste it
    <?php
    header (’location: AFFILIATE LINK GOES HERE’);
    ?>
  • Copy the desired affiliate code and place it into the space above
  • Save the file as “affiliate.php” or name of choice
  • Open your FTP program to create a new subfolder under your domain. Choose something simple for the name.
  • Upload the file to the subdirectory folder

When you are ready to send traffic to the affiliate of choice just link to the PHP file you just created.

comments


Maybe You Missed These Posts:

7 Responses to “PHP Redirect for Affiliate Ads”

  1. Patrick

    Good information, thank you.

  2. Angel makes money blogging

    Yep, this seems to be the norm these days, but I wonder how effective it still is as everybody has now exposed this method.

  3. Music Dictionary

    I have been struggling with this problem for some time now and this has come at a very useful juncture. Thanks.

  4. tim

    Dude, that’s brilliant. I hate feeling like I’m losing cred on my sites with affiliate links. Cool cool idea.

    Thanks man!

  5. steve

    I’ve been using an online Affiliate Link Cloaker to generate a html file for my affiliate links, but this looks like a good alternative.

    Thanks for sharing….

    –Steve

  6. Chris

    I’ve been looking for the same thing. Like, I actually made two posts on two different forums asking how. I wanted some a little more complex where it would count the links, but this will work too. I have a lot of html pages saved, like 1000’s of them. And if one of my affiliates went out of business. That’s a lot of editing to do!!

    Thanks!!!

  7. Robert Eilers

    This is exactly what I’m looking for. My question is how do I use Google Analytics to track this page? Can I? Where would I put it in the page? Can I use:

    Would that work?

Leave a Reply