How To Hide ClickBank Affiliate Links
Here is how to hide ClickBank affiliate links in your posts to the web.
When you get your ClickBank affiliate link it is best to go for the encoded version. This looks something like: 3aa6b2rhnd05g83j35ob3kepfp.hop.clickbank.net/?tid=BLOG Here I have included a tracking code: BLOG This helps when viewing your reports to see where the conversion came from.
My method involves embedding links of the form: go/3aa6b2rhnd05g83j35ob3kepfp or replace “go” with whatever text you like. You can see that the encoded string from the hop link has been appended to the embedded link, so it looks like a link like you might find on a large e commerce site.
So when you create a link in say a blog post, insert a link in this format into your article text.
Now, to make this work, we need to add a line of code to our .htaccess file. You should have this file in the root of your website if you are on a Linux host and have set up SEO friendly URLs.
Here is the code for the .htaccess file:
RewriteEngine On
RewriteRule ^go/(.*)$ http://$1.hop.clickbank.net/?tid=BLOG [L,R=301]
“RewriteEngine On” is likely to be already in the .htaccess file, but it is a vital component to enable URL re-writing.
The next line does the magic to redirect clicks on our new links to ClickBank. In this line of code I have appended the tracking ID to the URL. And notice that I have added go/ as a prefix to match up with our links in the article text. You can change this to whatever text prefix you prefer to use.
Following the slash is a pattern-matching code which grabs the encoded string and adds it before the hop in place of $1 in the redirect link.
In the square brackets we have some directives to tell the server that this is the last .htaccess rule to evaluate if this one matches our URL link, and make the link a permanent redirect (301) to keep the affiliate companies happy (so that the keywords of the link will be associated with the final landing page – this is something eBay insist on).
It’s best to tag these affiliate links as no-follow since it may help with our on-page SEO. To do this I use a robots exclusion clause in my robots.txt file as follows:
User-agent: *
Disallow: go/
This tells any search engine spiders to not follow any links starting with go/ But adjust this to suit whatever file path and prefix you are using with your affiliate redirect links.
Hopefully this guide to how to hide ClickBank affiliate links makes sense and helps you out. If you have any questions, please post a comment.


Recent Comments