Affiliate links look ugly and search engines don’t like pages that contain a lot of outgoing affiliate links. Hiding affiliate links means you don’t make it obvious you’re promoting an affiliate product or service to any potential buyer.
A link such as http://www.bargainsonsale.com/ looks better than http://www.bargainsonsale.com/affID=923945 and many companies will remove the query string at the end (affID=923945) once a user visits the site.
How you cloak links will depend on how many affiliate links you have and whether you wish to rely on a plugin or extension or add the code yourself. This article will show you both methods.
Do it yourself Method
When cloaking links I prefer to have all cloaked redirects in one file. That way they’re easy to modify and all in one place.
Things you should consider
You need to own your own web host. I recommend SiteGround Web hosting, just because of it’s speed, reliability and great customer service.
The .htaccess file must be uploaded to the root of your webserver. If you own multiple domains you should upload the .htaccess file to the appropriate folder representing the desired domain.
If you already have a .htaccess file you should first download it and then make a copy just in case you mess things up. You need to add the code at the end of the .htaccess file and be careful not to change anything else.
If there’s no .htaccess in the root of your domain, simply create a blank text file and open it.
Copy the affiliate link you want to cloak and enter the following code each on a separate line
Redirect /mydirectoryone http://1.hop.clickbank.com
In the above example mydirectoryone is a directory or folder and http://1.hop.clickbank.com is your affiliate link. mydirectoryone does not have to exist as a directory on your web server. It will merely be the text used to cloak the link.
You can add multiple directories and affiliate links
Redirect /mydirectorytwo http://http://2.hop.clickbank.com
Redirect /mydirectorythree http://http://3.hop.clickbank.com
Redirect /mydirectoryfour http://http://4.hop.clickbank.com
Redirect /mydirectoryfive http://http://5.hop.clickbank.com
Save the file as .htaccess and upload to your web server. Make sure to include the period at the beginning of .htaccess
Plugins and Extensions
Here is a list of popular options for cloaking affiliate links. Some of these are for self hosted sites and others are for WordPress based sites.
Web based
LinkTrackr
LinkTrackr is a web based link cloaking and tracking program. It can track conversions, leads, sales, and advertisements and provide individual reporting for different ad campaigns. Prices range from $9 per month to $69 per month. For $39 per month and up it can even provide A/B split testing.
AdTrackzGold
AdTrackzGold is a web based affiliate cloaking, link tracking software that also provides split testing. Adtrackz Gold let’s you see where all your traffic is coming from, and then automatically analyzes the return of investment of those sources so you can focus your time on campaigns that make money, and drop those that don’t.
WordPress Based
Pretty Link Lite
Pretty Link Lite has been around for awhile and is one of the most widely used WordPress plugins to manage affiliate links. It lets you shorten and track links with basic statistics. It also allows you to put links into groups and set them to “nofollow” and allows you to use either 307 temporary redirected links or 301 permanently redirected links.
This plugin comes in free as well as pro versions and the premium version brings in number of quality features like masking your links automatically to save a lot of time.
ThirstyAffiliates
ThirstyAffiliates empowers website owners with the tools they need to monetize their WordPress website with affiliate marketing.
It lets you administer your affiliate links, assists you with inserting them into your posts, pages and comments and gives you a central location in WordPress to manage all of your affiliate links.
ThirstyAffiliates will create pretty links from ugly affiliate links (aka link redirection or link cloaking) all the while giving you the double benefit of protecting your commissions from theft.
WooCommerce Cloak Affiliate Links
The WooCommerce Cloak Affiliate Links plugin allows you to mask all external links in your WooCommerce store.
For example, change this…
merchant.com/index.php?aff_id=123&product_id=456
… into this:
yoursite.com/go/123
Configure the status code for the redirect to either 301, 302 or 307.
The plugin also adds a “Disallow” to your robots.txt file to prevent bots from following those external links.
Affiliate Links Lite
Affiliate Links is a WordPress plugin for creating and shortening any internal or external links. This plugin will be useful for masking partner links to affiliate websites. You can also use it for shortening long URLs to simple pretty links such as ‘mysite.com/go/link’.
Key features
Hit count stats
301/302/307 HTTP redirect codes setup
Nofollow and noindex for redirects
Link categories setup
HTML and shortcode generator for link embedding
Category slug in the link URL if needed