Home Lessons & Videos Site Building Intermediate 3 ways to hide your affiliate links with redirects

How to hide your affiliate link with redirects

Affilorama members only


Watch a preview Join for free

How to hide your affiliate link with redirects

2008-09-16 01:08:33

A redirect is when you visit a particular page or website and it automatically forwards you to a different address. In this lesson we show you how make your affiliate links safer and friendlier by investigating how to hide your affiliate link with redirects.

Why create redirects?

1) It looks friendlier

Instead of putting your (rather unfriendly) affiliate link into a page, you can create another page on your site that automatically redirects to your affiliate link. Then when you want to send people through your affiliate link, you can provide them with the (much friendlier) address of your redirect page on your website. This means that you can put this address inside emails/newsletters and it will look much more attractive to your readers. For example:

could become

Instead of trying to send people to your ugly affiliate link (http://example123.rspanish.hop.clickbank.net/), you can instead send them to the non-intimidating http://example.com/recommends/rocketspanish/ address. This page automatically redirects to your ugly affiliate link anyway, but your visitors never have to look at it.

2) It can reduce commission hijacking

Redirects are also a useful way of "cloaking" your affiliate link so that other people don't see it and think, "hmm... I could click on this affiliate link, or I could join the program and click through my link instead and get the commission myself!" Redirects make your affiliate link less obvious to other affiliates.

3) They can save you a LOT of editing later!

By diligently setting up redirects for all your affiliate links, you're safe if the merchant ever changes their affiliate network or affiliate link system. You'll just need to change the link in one place, instead of going through all your web pages and newsletters to change the links. If you set up redirects for ALL products, not just affiliate products, you'll also be able to easily add an affiliate link if an affiliate program ever becomes available for that product. Handy!

Easy affiliate redirects with AffiloTheme

The easiest way to do this by far is with AffiloTheme. If you don't have AffiloTheme, you'd need to get it on your website in order to create your affiliate redirects this way.
Basically, you just go to the Affiliate Redirects option in the AffiloTheme menu in WordPress. 


Then click "Add redirect".

add new

Then, enter the name for the end of your link. So if you wanted the link to be www.yoursite.com/go/rocketspanish then you'd enter "rocketspanish". Remember to type it exactly as you want it to appear in the link. Then you enter your affiliate link below that and save your redirect.

enter details

Then you can put "www.yoursite.com/go/rocketspanish" all throughout your website and newsletters, but anyone clicking on that link will be automatically redirected to go to the merchant through your affiliate link. 

Basically it does the same job as the ugly affiliate link, but looks much more tidy and trustworthy.

Using PHP redirects

The easiest way to do it is to simply paste the following snippet of code into a blank web page, and change it to point to the page you want to redirect to (which will usually be your affiliate link).

header( 'Location: http://www.youraffiliatelink.goes.here.com' ) ;

IMPORTANT: This code needs to go directly into your HTML in source view, and it must go into a completely blank page: There shouldn't be anything else on the page, not even <html> </html> tags. You also need to save the page as a .php file.

Meta Tag redirects:

Another method you might see is the meta refresh. It looks like this:

<meta HTTP-EQUIV="REFRESH" content="0;

In this piece of code, the URL is the address you want to redirect to, and the "content="0; refers to the number of seconds the page should wait before redirecting. In this example, "0" means the page will redirect instantly.

This method is slower than the PHP method, but it allows you to add a message to the page if you want. Redirect pages traditionally have a "if this page doesn't redirect in 5 seconds, click here" message to be nice to older browsers. These days it's not really necessary, (and not really desirable for affiliates) - you're better off sticking with the faster PHP method.

Lesson Summary

In this lesson  we've taken a look at some reasons for using affiliate link redirects, including:

  • It looks friendlier
  • It can reduce commission jacking
  • It can save you a lot of editing later

We also looked at two ways you can create affiliate link redirects, including:

  • Using PHP redirects
  • Using Meta Tag redirects


Learn something new? Share it with your friends!


Questions & Comments + Add a comment

Reply adr_ltd
Great post although i tried this method afew weeks back they do help the links look professional and avoid potential earning loss but i came across an article in google stating that link cloaking may prevent your page being indexed as often and could potentially affect your overall google search ranking
Reply Clarence Coggins
I find that url cloaking is effective in social media sharing of material. It is just so much more user friendly. I also found that people need to make sure their url shortner isn't stripping off any affiliate cookies or end of the affiliate url. Some just take from the domain name and leave off the rest.

Once can also think about using CNAME.
Reply Tommy Johnson
Great Post - How can one upload just the affiliate redirect without uploading affilo Theme? I rather not use PHP or Meta tag redirect methods. I'm using a different theme and am having a time trying to find a plugin that provides the same service which brings me to my next question, can you recommend a plugin?
Aletta Is Too Cool
I believe there are a few plugins out there that work with any theme, but the only one I've tried so far is https://wordpress.org/plugins/quick-pagepost-redirect-plugin/ -- I haven't tried any others because that one did the trick! (If it ain't broke, don't go looking for other plugins.)

It comes littered with a bunch of "don't use this, it doesn't work!" warnings, which makes it look at bit unreliable, but I haven't had any problems. You could also try any number of other redirection plugins in the WordPress plugins directory: https://wordpress.org/plugins/search.php?q=redirect
Reply himanshu
Hello ..
How can I get a php redirect as used by savemoneyindia.com?
The put so many links and i am sure there would be some easy way out. Also they don't put there affiliate link, but the simple product url and it gets affliated automatically.

Pls help !
Aletta Is Too Cool
I don't really know what you're asking. What sort of behaviour are you wanting for your site? (Eg, "I add an affiliate link to my website and it is automatically turned into a nice redirect so that it doesn't look like an affiliate link"?)

That site you refer to looks quite large, and probably has some fancy system going on in the background that would require a programmer to create. It's probably a little bit beyond the scope of this lesson.
Reply James Wani
Hi everyone who knows the answer...

does affiliate links goes to products links or to the merchants website?

Melissa Johnson
hi, James!

I believe that depends on the affiliate program. Some are set up different ways. But affiliate tracking works with codes in the URL and cookies.
Reply Adrian
Please tell me if this method of "link cloaking may prevent your page being indexed as often and could potentially affect your overall google search ranking"?

This question seems to be very important to me.
Melissa Johnson
In short, the point is to avoid link cloaking because your page won't get indexed as often (Google indexes pages to determine what's on them and where to place them in search engine results page).

There are other reasons why this is important, too: if your page isn't indexed whenever it's updated, you might miss out. Google can't tell if you've improved your keywords, provided more relevant content for those keywords, or even just fixed some of the technical on-page SEO issues. So you want to get your site indexed when you make changes to it... and link cloaking can prevent that, so it can be a very bad thing.
Reply Paul Koroyin
I have a domain name but no website, how and where do I start promoting offers with just the domain name?
Justin Golschneider
Hi Paul! Check out our article on affiliate marketing without a website: https://www.affilorama.com/introduction/affiliate-marketing-without-a-website

That should have all the info you need. :-)
Reply Martin Hamilton
Does this method cloak the sitename? In other words while viewing the affiliate product will my url show in the address bar or will the affilite product url?
  • Anatomy of a Web Page #2 In this lesson we're going to look at a few more elements that make up your average web page, as well as a brief intr...
  • Simplifying Navigation with PHP Includes Websites with more than one page can be a pain to update. However, 'PHP includes' allow you to change multiple pages ...
  • Date Scripts What better way to get your visitors to act now than to give them a deadline? "Act now! This offer expires tomorrow!"...
  • Sitemaps When you become desperate to find a particular page on a site, you need to refer to the sitemap. Learn what it does, ...
  • How to Move Your Pages With 301 Redir... If you've got a page on your affiliate site that's doing well, but you want to move its location without losing any t...
  • URL Canonicalization – To www or not ... Why are www.example.com and example.com not the same website? We take a look at what that "www" means for you as an a...
  • Robots.txt - Telling the search engin... To index your site, search engines send spiders to crawl all your content to check for relevant information. But what...
  • How to create a rollover button In this lesson we'll be explaining the steps involved in creating a rollover button and how to add it to a page on yo...

Don't forget to follow us!

More topics

Essential Resources Every New Affilia... New to affiliate marketing? Not sure what it's all about? Then let us get you started!
Affiliate Outsourcing No one person can do everything on their own. Learn how to reduce (or even eliminate!) your workload with outsourcing.
Site Building As an affiliate, chances are you'll end up building a website or two. Here's your basic quickstart!
Marketing Ideas Needing inspiration? Wanting to go outside the box? Take a look in here for your next few marketing ideas!
Market Research for Affiliate Marketers To be a successful affiliate you must learn how to research their market before dedicating your precious time.
Pay Per Click Pay-per-click is one major method affiliates use to get traffic. Learn what it is and how you can use it effectively!
Search Engine Optimization Search engine optimization (SEO) is a major way of getting traffic to your site at minimal cost! Learn how to put it ...
Content Creation This section is all about content: How to write it, how to get it written for you, and other useful goodies!