John Chow dot Com Free WordPress Installation - Start Your Blog Today!
 

How To Hide Affiliate Links

written by John Chow on April 27, 2007

How to make $593 in less than one hour

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.

Did you enjoy this post? Get John Chow Dot Com updates via email...

Stay up to date with all of John Chow’s tips for making money online and blog posts by subscribing via email. Your email will be kept private and never shared with anyone.

{ 49 comments }

Ed Lau April 27, 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.

Dave April 28, 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.

Cool tips and tricks April 30, 2007 at 12:51 am

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

Court April 27, 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.

Dave April 28, 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.

DMOZ April 27, 2007 at 4:59 pm

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

BlueFur.com April 27, 2007 at 5:04 pm

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

Justin AKA Shocker April 27, 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.

Tob April 27, 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.

DMOZ April 27, 2007 at 8:23 pm

I don’t get it…

Everyday Weekender April 28, 2007 at 9:44 am

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

Cognoscente April 27, 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.

Jaxia April 27, 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.

Great Dog Site. April 27, 2007 at 6:59 pm

I use PHP direct!

blogdinero April 27, 2007 at 7:00 pm

thanks john, some times we forget the code

scott April 27, 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.

John Chow April 27, 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.

troy April 28, 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.

Cool tips and tricks April 30, 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.

Dave April 28, 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?

Robert Irizarry April 28, 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.

Everyday Weekender April 28, 2007 at 9:44 am

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

Robert Irizarry April 29, 2007 at 6:08 am

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

Best CD Rates April 27, 2007 at 9:05 pm

Great tips.

Eastwood Zhao April 27, 2007 at 9:45 pm

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

Ronaldo April 27, 2007 at 9:48 pm

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

Make Bank Online April 27, 2007 at 10:35 pm

Some good ones here. New 2 me.

Ronaldo April 27, 2007 at 11:05 pm

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

Jeff Kee April 27, 2007 at 11:30 pm

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

Rizal April 28, 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:

Miriguy April 28, 2007 at 3:00 am

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

Dave April 28, 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…

Halfdeck April 28, 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/’;”

Tyler April 28, 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.

Digitalcameratips April 28, 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

Justin AKA Shocker April 28, 2007 at 10:55 am

oops, thanks for pointing that out. :smile:

Neil Galloway April 28, 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.

Robert Irizarry April 28, 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.

Best CD Rates April 28, 2007 at 9:10 pm

hm this is getting a bit too technical for me

Jonathan-C. Phillips April 29, 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 :)

Eric April 29, 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!

monetize your blog April 29, 2007 at 6:06 am

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

Investorblogger April 29, 2007 at 6:18 am

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

Kenneth

Ades April 29, 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/

Mike April 29, 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

Wii Skins April 29, 2007 at 8:43 pm

excellent! :twisted:

How to start a clothing line from scratch April 30, 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

Varun Saxena May 9, 2007 at 2:48 am

Give me the ASP redirect… :lol:

Eliot Dill May 10, 2007 at 9:03 pm

The first method is certainly the most classy…

Although nothing groundbreaking…