With the increasing popularity of using affiliate links to generate income online, it can significantly improve your conversion rate on affiliate sign-ups by disguising your affiliate links using a URL with your domain name, then redirecting them to the appropriate affiliate. 

The idea behind using this theory is that readers will click on it thinking it is an internal link on your site, rather than taking you to a third party site.  Another benefit is that all of your blog’s links point toward an internal address on your domain, giving you control to update the URL easily. This helps avoid dead links whenever a company changes a URL and makes it easy to update your affiliate links when the need arises.

Redirects can be accomplished in a variety of ways, but as this blog focuses on self-hosted WordPress, I will be going over an easy way to do this using a PHP redirect.  Here are the steps I took when I hid my affiliate links for this website:

  1. Create a folder called “Go.”
  2. Create a .php document (this can easily be done with Notepad or any similar program) and name it after the appropriate affiliate link you are using.
  3. Now paste the following code into the document: <? header("Location: http://youraffiliatelinkurlhere"); ?>
  4. Hide Affiliate LinksSave it into the “Go” folder created above.
  5. Repeat steps 2-4 until you’ve created a .php file for each affiliate link.
  6. Go to your FTP and upload your “Go” folder directly to the public_html folder.
  7. Update all your affiliate links to point towards your new redirect!

Your redirect will look something like http://www.yourdomainname.com/go/phpdocumentname.php.

You can name the documents whatever you want, or you can use a different name than “Go” for your folder name.   The important thing is that you remember what you named it so that you can use your new affiliate link!

Want automatic updates? Subscribe to our RSS feed or
Get Email Updates sent directly to your inbox!
Digg This | Stumble it | Add to Del.icio.us | | Print This

There Are 21 Responses So Far. »

  1. 1 Garry Conn
    Wednesday, October 10th, 2007 at 10:03 am

    Great write up on this… I am sure that many people have wondered about this as they see its use on some popular blogs such as John Chow’s. I have known about this, but it’s great to have someone do a nice write up on it. :)

  2. 2 Just SharePoint
    Monday, October 15th, 2007 at 6:30 am

    I use this and I think its a good way to do. Well written.

    Do you know how to do a dynamic redirect for external links - like if i were to link to your blog/site then when the user hovers will see http://justsharepoint/?http://hackwordpress.com - does that make sense?

  3. 3 Hack WordPress
    Tuesday, October 16th, 2007 at 7:58 am

    Just SharePoint - Glad you found it useful!

    I don’t know how to do those types of redirects off the top of my head, but I’ve added it to my “to-do” list. I’ll look into it a little bit and see if I can get a post up covering it in the near future.

    Thanks for reading!

  4. 4 Just SharePoint
    Tuesday, October 16th, 2007 at 11:38 pm

    Thanks. Look forward to reading that..

  5. 5 A. Marques
    Monday, November 12th, 2007 at 10:38 am

    Ok, now you’ve convinced me. I’ve been undecided whether to use this method or not for affiliates. Guess I’ll give it a shot.

  6. 6 rhyan
    Saturday, January 19th, 2008 at 11:53 am

    thanks for this info … It helps a lot :)

  7. 7 Mike Smith
    Monday, February 25th, 2008 at 9:57 pm

    I’ve used this before. Not with /go/ folder option, but for a few other things and it works great. You can also add a banner to the file you’re adding the redirect to just in case the redirect doesn’t work, the visitor still sees something.

  8. 8 Copes Flavio
    Tuesday, April 29th, 2008 at 1:04 am

    Nice post, this was quite useful ;) it’s also a great way to centralize the control over your links

  9. 9 Susan
    Saturday, August 2nd, 2008 at 9:57 pm

    This is rated as #1 of my top wordpress plugins - great job!

  10. 10 lida
    Tuesday, September 30th, 2008 at 6:37 pm

    thanks a lot

  11. 11 TechnoSamrat
    Thursday, October 2nd, 2008 at 11:46 am

    Thanks a lot for the tip.. I guess there are also some plugins that does this job.. But I love this one…

  12. 12 Sammy Morris
    Saturday, November 8th, 2008 at 7:12 pm

    I have affiliate link codes that also have the “image” in them. Do I also add the image code as well? Does this screw up how the affiliate checks for impressions?

  13. 13 HLC
    Tuesday, March 3rd, 2009 at 5:35 am

    Found what I’m looking for. Thanks!



Leave A Comment