Looking for an SEO Firm to outsource all your SEO Needs?
 

How To Hide Affiliate Links

written by John Chow on April 27th, 2007

I wrote about hiding affiliate link for better SEO last month. However, the method I wrote about is just one of many ways to hide an affiliate link. I asked Justin from MyPCRig to share a few other ways to hide an affiliate link. This is what he came up with.

As John has mentioned more than a few times on this blog, people are more likely to click on a link if it doesn’t contain an affiliate code. To help you increase your affiliate signup rate, I’ve come up with a list of ways to hide an affiliate link. Keep in mind that there are many ways of doing this. I will be highlighting some of the popular techniques. As always, please read your affiliate program’s TOS and make sure this doesn’t go against it. Some programs have no problems with you hiding an affiliate link while other programs strictly forbid it.

.htaccess

This is a great file to get to know, if you’re using linux. .htaccess is located in the same folder as your index.html or index.php files. If not, you can create one.

Open it up .htaccess and move to the bottom of that file and type this in:

RewriteEngine on
RewriteRule ^john.php$ http://johnchow.com?ref=justin [R]

“RewriteEngine on” just turns on the mod rewrite program. As you see, url.com/john.php will be redirect to John’s website, plus it will contain your affiliate code. This is a very easy way to hide your affiliate code and you just need to edit one file.

HTML Redirect

Another easy way to do hide your code, that doesn’t require a certain OS. Create a file called john.htm and type this in.

<HTML><HEAD><TITLE>Taking you to johnchow.com website</TITLE> <meta
http-equiv="refresh" content="0; url=http://johnchow.com?ref=justin">
</HEAD> <BODY>Please stand by.</BODY> </HTML>

You just need to create a new HTML file for each of your affiliate program.

PHP Direct

If you have PHP install on your server, then you can use this technique. With
PHP there is a lot of different ways of doing this, but for the time being, I’ll
show you the super easy way.

Create an file called john.php and type this in:

<?
header("Location: http://www.johnchow.com/?ref=justin");
?>

Save it and that’s it. Now url.com/john.php will now take you to johnchow.com/ref=Justin. As with the html way, you will need to upload a new file for each of your affiliates.

Javascript Redirect

This technique will work great on websites, however not in blogs with rss
feeds. Also if a reader turns off javascript, it will take the user to the url it’s
showing. Please note: Google bot has javascript turned off. If the user tries to
open it in a new browser or tab, it will not go to the hidden url.

<a href="http://www.mypcrig.com" onclick="parent.location.href=’http://www.johnchow.com/?ref=justin’;
return event.returnValue=false">Mypcrig</a>

These are great ways to increase your affiliate conversions. They might be a
little evil, but it’s a great way to make money online.

Ed Lau said on April 27th, 2007 at 4:47 pm

LOL! Damn that’s evil…but it’s quite true. Most people don’t want to benefit others and are less likely to click on stuff with affiliate codes.

Reply to this comment
Dave said on April 28th, 2007 at 6:00 am

Very true Ed, some people may even just mouse over the affiliate link,and then type it in to their browser. Stripping out your affiliate code.

I’ve done that before, when I found a link on a spam site loaded with affiliate advertising and other ads.

Reply to this comment
Cool tips and tricks said on April 30th, 2007 at 12:51 am

I’ve done that before too, by the time I even did not know what an affiliate link was.

Reply to this comment
Court said on April 27th, 2007 at 4:55 pm

Very nice trick. I knew there was a way to do it but I didn’t know that people would click on them more if you did it. I don’t personally care if someone gets paid for recommending a good product to me.

Reply to this comment
Dave said on April 28th, 2007 at 6:03 am

Yeah I don’t mind affiliate links if the site actually helped me.

I usually only strip out affiliate code if the advertiser is doing something shady.

Reply to this comment
DMOZ said on April 27th, 2007 at 4:59 pm

Another kick-ass way is to buy mis-spellings of the site. For instance http://www.CopeacAds.com :twisted:

Reply to this comment
BlueFur.com said on April 27th, 2007 at 5:04 pm

Another one would be to use a url forwarding site like tinyurl.com

Reply to this comment
Justin AKA Shocker said on April 27th, 2007 at 5:08 pm

True, however people are starting to catch on to that. Plus a URL from your site is more creditable and more likely be clicked.

Reply to this comment
Tob said on April 27th, 2007 at 5:28 pm

Ahhh… you are missing my favourite link hiding trick of all!

test link to google

When they click it instantly changes the HREF to yahoo and also preserves referrer.

Enjoy.

Reply to this comment
DMOZ said on April 27th, 2007 at 8:23 pm

I don’t get it…

Reply to this comment
Everyday Weekender said on April 28th, 2007 at 9:44 am

it didn’t work for me.. nice trick though :lol:

Reply to this comment
Cognoscente said on April 27th, 2007 at 6:23 pm

Thanks to Justin and John for the tips. I will have to keep them in mind when it comes time to monetize the site.

Reply to this comment
Jaxia said on April 27th, 2007 at 6:41 pm

Do any of the common programs forbid it? The language of those ToS agreements can be pretty hard to figure out.

Reply to this comment
Great Dog Site. said on April 27th, 2007 at 6:59 pm

I use PHP direct!

Reply to this comment
blogdinero said on April 27th, 2007 at 7:00 pm

thanks john, some times we forget the code

Reply to this comment
scott said on April 27th, 2007 at 8:55 pm

How many times are you going to rehash the same garbage? I haven’t seen a quality post from you in months.

Reply to this comment
John Chow said on April 27th, 2007 at 9:09 pm

How times are you going to ask the same question? I haven’t seen a quality comment from you in months.

Reply to this comment
troy said on April 28th, 2007 at 9:06 am

John,

LOL

1)Regarding aff do you have something for blogger (blogspot.com) ???

2)Where is harpzon?

Nice post anyway.

Reply to this comment
Cool tips and tricks said on April 30th, 2007 at 12:55 am

Of course, if people strive to produce quantity, and do it fast, this is what you get. Did you hear about the GIGO effect? Yet, Scott is not right regarding the quality. And he is free to go read something else at any given time, if he’s not happy.

Reply to this comment
Dave said on April 28th, 2007 at 6:04 am

The solution is simple Scott, stop reading and visiting this blog!

I don’t know why you’re still coming here if you haven’t seen anything interesting in months.

What’s up with all the haters lately?

Reply to this comment
Robert Irizarry said on April 28th, 2007 at 2:26 pm

Isn’t that the way it goes? The more successful someone becomes the more likely there will be folks who resent that success. I prefer to admire John for his originality and focus.

Reply to this comment
Everyday Weekender said on April 28th, 2007 at 9:44 am

you don’t like it … don’t read it. :mrgreen:

Reply to this comment
Robert Irizarry said on April 29th, 2007 at 6:08 am

At the end of the day, it really is that simple. It’s even easier than changing channels. :wink:

Reply to this comment
Best CD Rates said on April 27th, 2007 at 9:05 pm

Great tips.

Reply to this comment
Eastwood Zhao said on April 27th, 2007 at 9:45 pm

very interesting trick, involves some technical-skills :twisted: evil!!

Reply to this comment
Ronaldo said on April 27th, 2007 at 9:48 pm

By the way, congrats on the new PageRank, looks like it’s 6 now.

Reply to this comment
Make Bank Online said on April 27th, 2007 at 10:35 pm

Some good ones here. New 2 me.

Reply to this comment
Ronaldo said on April 27th, 2007 at 11:05 pm

I don’t monetize yet, but I would go with the PHP page.

Reply to this comment
Jeff Kee said on April 27th, 2007 at 11:30 pm

From a web developer’s perspective the header() redirection using PHP sounds like the best one.

Reply to this comment
Rizal said on April 28th, 2007 at 1:34 am

.htaccess file work to make spider rewrite our url.. :D. add robots.txt too file to the spider will more crazy.. :mrgreen:

Reply to this comment
Miriguy said on April 28th, 2007 at 3:00 am

I create a HTML file for each of the aff product I m promoting.

Reply to this comment
Dave said on April 28th, 2007 at 6:06 am

Yes, that’s the method we use too!

I don’t know if one of these other methods would be more useful though…

Reply to this comment
Halfdeck said on April 28th, 2007 at 4:19 am

I like this JS better:

href=”http://redirect.com/redirect/” onmouseover=”this.href=’http://www.domain.com/’;” onclick=”this.href=’http://redirect.com/redirect/’;”

Reply to this comment
Tyler said on April 28th, 2007 at 7:41 am

Just remember if you are using the header() function in PHP you must make sure you do not have any output to the browser prior to calling it.

Else it will give you the infamous Headers Already Sent error message which will drive you insane!

I also like to use exit(); after a header(); because it stops the rest of the script from executing on the server.

Reply to this comment
Digitalcameratips said on April 28th, 2007 at 8:52 am

When using the PHP version above, don’t forget to include the ? .
The link should be http://www.johnchow.com/?ref=justin

Reply to this comment
Justin AKA Shocker said on April 28th, 2007 at 10:55 am

oops, thanks for pointing that out. :smile:

Reply to this comment
Neil Galloway said on April 28th, 2007 at 9:15 am

Wow, this is sneaky. Very slick though. You can always use the same link and not worry about looking up affiliate code or storing it somewhere. I wonder if this is a bit on the unethical though…hmmm? I guess it is not like they are out any money, they just think they will be directed to a page where you are talking about it.

Reply to this comment
Robert Irizarry said on April 28th, 2007 at 2:28 pm

John - Great post! As a newcomer to Wordpress and a hosted environment, I appreciate tips like these. So much great stuff to learn.

Reply to this comment
Best CD Rates said on April 28th, 2007 at 9:10 pm

hm this is getting a bit too technical for me

Reply to this comment
Jonathan-C. Phillips said on April 29th, 2007 at 12:11 am

will definitely ‘try’ to apply those tips, i was just wondering about that, so that post comes at the right time :)

Reply to this comment
Eric said on April 29th, 2007 at 1:01 am

Great tips, I know that I personally always look to see if someone is profiting off of my ADD clicking. I’ll certainly be using these quality tricks! Thanks John!

Reply to this comment
monetize your blog said on April 29th, 2007 at 6:06 am

it’s good to know, thanks for the tip, john

Reply to this comment
Investorblogger said on April 29th, 2007 at 6:18 am

Technical yes, I always wondered how John did that trick! Now we know!

Kenneth

Reply to this comment
Ades said on April 29th, 2007 at 4:04 pm

Or you could use script called Shorty that I blogged about here. It will shorten long urls as yourblog.com/keyword/

Reply to this comment
Mike said on April 29th, 2007 at 4:09 pm

If someone clicks on http://www.johnchow.com/go/tla.php, the landing page becomes http://www.text-link-ads.com/?ref=35183

Is there a fix to that? I don’t want the ?ref=35183 to appear on the landing page.

2) Also… where can I get a redirection script similar to http://www.creditcard321.com/go/dscpla.htm

I like the “bar effect”

Thanks,
Mike

Reply to this comment
Wii Skins said on April 29th, 2007 at 8:43 pm
How to start a clothing line from scratch said on April 30th, 2007 at 11:53 am

With my blog i really don’t need to hide the affiliate links because most don’t even know the meaning, because their first concern is fashion.

Clothing Line

Reply to this comment
Varun Saxena said on May 9th, 2007 at 2:48 am

Give me the ASP redirect… :lol:

Reply to this comment
Eliot Dill said on May 10th, 2007 at 9:03 pm

The first method is certainly the most classy…

Although nothing groundbreaking…

Reply to this comment

Sorry, the comment form is closed at this time.