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:
- Create a folder called “Go.”
- 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.
- Now paste the following code into the document:
<? header("Location: http://youraffiliatelinkurlhere"); ?>
Save it into the “Go” folder created above.- Repeat steps 2-4 until you’ve created a .php file for each affiliate link.
- Go to your FTP and upload your “Go” folder directly to the public_html folder.
- 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!


















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.
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?
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!
Thanks. Look forward to reading that..
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.
thanks for this info … It helps a lot
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.
Nice post, this was quite useful
it’s also a great way to centralize the control over your links
This is rated as #1 of my top wordpress plugins – great job!
thanks a lot
Thanks a lot for the tip.. I guess there are also some plugins that does this job.. But I love this one…
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?
Found what I’m looking for. Thanks!
That worked great !
Thanks.
Thanks for tips.I wanna using it n my blogs.
its the great idea, but for wordpress beginner like me
its not simple because I must create one file for one affiliate program. We also use http://patchlog.com/wordpress/hidden-affiliate-links-update-version-02/ to hide our affiliate link. Its the best wordpress plugin to hide affiliate link…
Could you recommend any specific resources, books, or other blogs on this topic?
thank’s bro… Found what I’m looking for. Thanks!