Simple Way To Hide Affiliate Links In Your Blog Posts With HTML Or PHP

Aside Google Adsense, the other reliable way to make money from your blog is affiliate marketing because it’s also easy to incorporate into your blog posts for your readers to see and click through to the desired destination. It brings more money than Google Adsense itself if well managed but it does come with some challenges; one of which is that people don’t like clicking on affiliate links.

affiliate program

Once people see that the links you put in a post is an affiliate link, they won’t click and they might even stop reading the post because they feel you are just trying to sell products to them and what you actually wrote in the post might not be that reliable. This is not even good for your blog because as soon as they start losing trust in your blog, it’s hard to gain it back.

There are ways you could overcome this challenge anyway. They are really simple steps to carry out and you should be knocking your head against the wall if you have suffered losses because you don’t know this techniques. Just kidding, one can’t just know everything and we all continue to learn everyday! If you are just starting a blog, you should consider using this from the start so that you won’t have to go back to edit old posts with affiliate links.

There are at least for methods that I know which you can use to hide affiliate links in your post. They are:
» .htaccess editing,
» Creating a PHP file
» Creating a HTML file
» Using javascript

I’m only going to talk about PHP and HTML methods because using .htaccess is technical and tricky while javascript has it’s own shortcomings too.
It’s not like the URL will be hidden and will not be available for clicking, no. It’s just going to be hidden behind another URL on your website. A URL under your domain. That’s cool you know.

Let me show you an example:
I have an affiliate link to Clickbank that looks like this http://secure.clickbnk.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=13658v3 and I think this is too long plus I don’t want my readers to know it’s an affiliate link. I could simply create another URL on my site that looks like http://www.cynamix.net/clickbank.htm and hide the former URL behind the latter in such a way that when the latter is clicked, it just opens the page the former one would normally open too! When you hover over the link too, it brings http://www.cynamix.net/clickbank.htm So the original link is totally hidden.

How To Hide Affiliate Links In Blog Posts With HTML

This is really very simple to carry out but it requires you to create a new file for every new affiliate link you want to hide. To achieve this one in my example above, create a new file called clickbank.htm and insert the following code:

<HTML><HEAD><TITLE>Loading Clickbank.com</TITLE> <meta
http-equiv="refresh" content="0; url=http://secure.clickbnk.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=13658v3">
</HEAD> <BODY>Please stand by.</BODY> </HTML>

Don’t forget to save it!
Now, whenever you need to create a link to that long URL, just type in  www.cynamix.net/clickbank.php and it will take you to the page the long affiliate link would normally take you.

How To Hide Affiliate Links In Your Blog Posts With PHP

To use this method, you need to have a PHP install on your server. Most hosting providers have these days on their servers but you can still confirm this from your host. This is the easiest way of all those available under PHP.

Still using the example above create an file called clickbank.php and type the following in:

<?
header("Location: http://secure.clickbnk.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=13658v3");
?>

Save it and you are through. Now www.cynamix.net/clickbank.php will now take you to http://secure.clickbnk.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=13658v3.

Now if you need to create a link to http://secure.clickbnk.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=13658v3, just use www.cynamix.net/clickbank.php instead and it will bring the same page.

Try this out and let me know how it helps you.

Be first to comment