Recent Album

Affiliate Summit East 2007

Random Image

DSC00331

Using .htaccess to Hide Affiliate Links

June 23rd, 2008 Derek

One of the best free ways to redirect your affiliate links is by adding a simple code into your .htaccess file.  This code allows you to link to a page on your website that doesn’t actually exsist and then redirect the user to your affiliate link or another site.

For example, let’s say you’re running an affiliate offer for online dating and you have built your landing page and on your site you’ve included links to several different sub-niches like asian dating, hispanic dating, etc.  So instead of linking to the affiliate offer directly so that others can see that they are being sent to an affiliate offer, you can instead send them to a url like http://www.yoursite.com/asian-dating and when they click on the link it will then redirect them through the affiliate url, thus increasing your CTR% (Click Thru Rate).

Adding this code is extremely easy and setting it up only takes a minute.  Simply open up your .htaccess file and add the following line to it.

redirect 301 /asian-dating http://YourAffiliateUrl

This code will then allow you to link from your landing page to http://www.yoursite.com/asian-dating and then redirect the user to the affiliate offer without them being aware of the affiliate link if they were to hover over one of your links.

You can add this line multiple times using each sub-niche by simply adding each one like this…

redirect 301 /asian-dating http://YourAffiliateUrl
redirect 301 /hispanic-dating http://YourAffiliateUrl
redirect 301 /black-dating http://YourAffiliateUrl

Another great benefit to using .htaccess to redirect your links is that you’re able to add those URL’s anytime in your articles and site and if you ever need to change the affiliate offer you’re using you can simply open up your .htaccess and replace one URL and it will reflect across your entire site!

So, quit changing all your links by hand and increase your CTR% by adding a quick and simple code to your .htaccess file!

In the next post, I will discuss using php to redirect and hide affiliate links which is another great, free method you can use that is very easy to setup as well!  Even if you have never used php or done any php programming.

Popularity: 27% [?]

StumbleUpon It!

RSS feed | Trackback URI

21 Comments »

Comment by Vad
2008-06-23 12:08:02

Hi there,
very strange, I did exactly what you say but nothing changed - the affiliate URL is still shown in the address bar?!
Any ideas?
Thanks
Vad

Comment by Derek
2008-06-23 13:59:06

Hey Vad, yes, in the address bar the link will still show, however, when people hover over the link on your site they will not see the affiliate URL, thus they will click though. This method also helps because alot of CPA companies send you through their own redirect URL which may look something like this…

http://a.jump.com/A5efL

However that URL may redirect to http://www.dating.com/id=123

It basically helps avoid the detection of the user being sent to an affiliate offer, it won’t actually keep your URL in the address bar. Iframing an offer will do that, however, most companies don’t allow you to iframe their offers!

 
 
Comment by Vad
2008-06-23 17:51:47

Nope, when I hover over the affiliate link it still see the aff link
May be I did something wrong
Thanks,
Vad

2008-06-24 01:24:06

In your .htaccess file write the following line:

redirect 301 /click-consultants http://www.clickconsultants.com

Now, when you put a link on your page to http://www.yourwebsite.com/click-consultants … it will show that as the link on your hover, but when they click it, it will take them to clickconsultants.com

A lot of sites use this with http://www.yourwebsite.com/go/affiliate.php to make it look more like a regular site like rather then an affiliate link.

Good article Derek. I used to use a meta refresh in the header of a file, but recently switched over to 301 redirects as well.

 
Comment by Derek
2008-06-24 02:02:53

Hey Vad, try adding this before the code in your .htaccess

RewriteEngine On

Let me know if that fixes it.

 
 
Comment by Vad
2008-06-24 03:10:57

Hi Derek,
I added it to no avail.
Here is my htaccess file:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
RewriteEngine On
redirect 301 /Forex-killer http://vad111.andreaskir.hop.clickbank.net/?tid=CSFK

I inserted the last line before and after # END Wordpress but nothing changed.

Is it save that I give htaccess file and other details to the public view?
Thanks,
Vad

2008-06-24 11:02:44

Hi Vlad, I don’t believe anything in your code there is harmful to public view. Its just the basic wordpress htaccess codes and then your redirect.

Can you pass along a link to the page you’re trying to use the redirect on so we can look at it and see if something is wrong there?

 
Comment by Derek
2008-06-24 12:34:35

Hey Vad the link http://compare-forex.com/Forex-killer redirects to your affiliate url, so it is working.

Did you change the link on your main page to the http://compare-forex.com/Forex-killer? Or do you still have your affiliate link in the a href tag?

Comment by Vad
2008-06-24 16:10:19

Yes I still have the aff link in the main page, should I change to “/forex-killer?”?
Thanks,
Vad

(Comments wont nest below this level)
Comment by Derek
2008-06-24 20:16:30

yes, you should change it to the URL that will redirect to the affiliate offer.

 
 
 
 
Comment by Grant29
2008-06-24 07:21:26

Change up the order, make your .htaccess file look like:

RewriteEngine On

redirect 301 /Forex-killer http://vad111.andreaskir.hop.clickbank.net/?tid=CSFK [L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

 
Comment by Vad
2008-06-24 11:08:59

Thanks,
this is the page:
http://compare-forex.com/forex-killer-review
Vad

 
Comment by deadmanblogging Subscribed to comments via email
2008-06-26 22:02:13

Great tutorial and works like a charm. I’m especially impressed the fact that you are sharing such great tips, mainly because you see others trying to sell a simple script that does the same thing. Only for those you need to stomach through a 15 page sales copy. ;)

Keep up the great work guys.

Comment by Derek
2008-06-26 22:20:11

Well, first off, thanks for the comment, we try to bring you guys the best information possible! So make sure you subscribe to show your support!

Secondly, some of those scripts actually cloak your links while using .htaccess won’t, although I’ve never seen the need to.

 
 
Comment by deadmanblogging Subscribed to comments via email
2008-06-26 22:22:48

So make sure you subscribe to show your support!

Way ahead of ya. ;)

 
Comment by affboy
2008-06-29 03:46:45

You may consider some free web tool.
like: http://hide-affiliate-links.com/
Even can encrypt the link.

 
Comment by Kevin Subscribed to comments via email
2008-07-14 19:21:54

So Derek, do you just have a gigantic list of redirects in your htaccess file? Sorry I’m a newbie to affiliate marketing.

 
Comment by Forex free download Subscribed to comments via email
2008-07-18 05:29:24

I visit your website regulary. All your tips are excellent.
Please keep those useful comments and suggestions coming !!

 
Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Trackback responses to this post