No Visitors on Your Blog? Get Tons of Traffic Today!
 

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.

Tweet This Tweet This Post!
English flagItalian flagKorean flagChinese (Simplified) flagChinese (Traditional) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroatian flagDanish flagFinnish flagHindi flagPolish flagRomanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flagSlovenian flagUkrainian flagVietnamese flag
By N2H
  1. 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.

  2. 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.

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

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

  5. Tob

    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.

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

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

  8. thanks john, some times we forget the code

  9. scott

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

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

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

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

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

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

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

  16. I like this JS better:

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

  17. 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.

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

  19. 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.

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

  21. hm this is getting a bit too technical for me

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

  23. 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!

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

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

    Kenneth

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

  27. Mike

    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

  28. 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

  29. The first method is certainly the most classy…

    Although nothing groundbreaking…

Trackbacks

  1. How to Hide Affiliate Links - April 28, 2007 at 10:56 am
  2. Roberto Alamos dot Com - The place to learn how to make money online » Blog Archive » Sunday Linking: Advice to make money online from 4.22 to 4.28 - April 29, 2007 at 6:52 pm
  3. Affiliate links? Cloak them! - SEO Blog - Joost de Valk - April 30, 2007 at 9:30 am
  4.   Affiliate Link Cloaking: Free Tools, Tutorials & Discussions by TimeForBlogging - May 1, 2007 at 10:04 am
  5. Del.icio.us bookmarks 2007-04-24 - 2007-05-04 | ABlueStar - May 4, 2007 at 1:16 pm