Yesterday, Paul asked:  Can you tell us how to cloak an affiliate link using no cost ways?

That’s a great question, and timely one, as we approach the New Year, and many of us are looking for ways to streamline and improve our websites for a better 2010.

Let’s first see what the definition of cloaking is, from

cloaking definition

As you see, cloaking is hiding something. Cloaking links, or to be correct, pages, is a black hat method you don’t want to use on your site.

Cloaking a link/page, means showing the search engines a page, and the visitor a different page. This is done by framing, and is SPAM.

On the other hand, affiliate link redirection is something you should be doing. Let’s see why:

Makes it Easy to Change Links Across Your Site

Let’s say over the years, as I write on my blog, I suggest Lynn’s Elite Forum, and end up with hundreds of links to her site. If my links look like this: and Lynn decides to change her affiliate program for some reason, I’ll have hundreds of pages to look up and change the code individually. But not if I did a link redirect.

Makes it Easier to Track

If you redirect your affilaite links, you can track how many clicked on your links without having to rely on the merchant. Some merchants do a very good job, and others couldn’t care less if you can track or not. With a redirected link, you can always see how many times that link was accessed through your stats program.

Shortens Long, Unreadable Links

Those long links with all kinds of letters and numbers may scare some people away from clicking on a link, thinking it may be a virus or malware. But if the link is short and has a name they can read, will ease their fears.

OK, now that we know why we should be redirecting links, let’s see how we can do it. There are a few different ways to do it, depending on what you are comfortable with.

.htaccess Redirecting – WARNING! You can mess up your site is you don’t understand your .htaccess file, so be careful!

This is very easy to do, if you are comfortable with your cPanel. Log into your cPanel, and open your .htaccess. At the end of it, add this code:

redirect 301 /oldpage.htm

My favorite way to redirect my links is redirecting from the server side with php, like this:

– create a page with the name of your product.php
– include this code: <?php header(‘Location:;); ?>

– make sure you don’t add any spaces, or your code won’t work.

– now go check the page you created and make sure it redirects to the page you intended it to: you have no idea how many people don’t check and lose a lot of money.

One more thing about redirecting affiliate links: put all you affiliate links in a folder, and create a blank index page in that folder. This way, not everyone can see all the programs you are promoting.

Also  this makes it easy to go in periodically and click on all your links to make sure the merchants didn’t change the landing page.

Go work on your redirects now, and start 2010 with a better, easier to maintain affiliate business.

Do you have any questions? Ask below.

2 comments on “Cloaking or Redirecting Affiliate Links?”

  1. Very good explaination, Adriana. Thank you!! I have a few questions though.
    1 – When do I need to redirect my affiliate links? As I set them up? Or, if the merchant changes things?
    2 – Can you set up a redirect from the server side with php using a WP site?
    3 – Does your new page have to mirror (look like) the old page that you're redirecting? I think the process of setting up a new page is a little confusing to me. Sorry. 🙂
    4 – Where on the new page that I create do I put that code?
    I'm coding challenged. LOL

  2. 1. You set up the redirect when you first link to your affiliate product. So, for example, if I am writing a post about outsourcing, and I want o promote Jimmy D Brown's and Nicole Dean's Outsource Weekly today for the first time, I need to set up my redirect now. Then, if they evern chage the program, or go offline, I can just go into my redirect file and change the code in one place, and all the links going to this product will now go to the right page.
    2. Yes, it doesn't matter that your site is WP. You jsut crete a folder in your root directory and put all your redirect files in there.
    3.Absolutely not. You see, when you redirect a page, no one will see the page you jsut created: they'll be automatically redirected to the merchant page. The redirect page is a very simple page, with only one line of code (look in the post for the yellow highlighted text).
    4. You place the code right at the top of the page.
    Let me know if that helped.

Comments are closed.