Affiliate Cloaking is a very popular term for WordPress blogging platform. It is most common practice for blogger to have affiliate links on their blog. On Crunchify we have made some changes recently on affiliate links and would like to share all steps which we performed to have nice Cloaking URL for affiliate links.
Mask Affiliate Links Which Is Safe in Google’s Eye.
If you have any of below questions then you are at right place:
- Link Cloaking 101: What Is Link Cloaking?
- How to cloak your affiliate links?
- How to Cloak Affiliate Links on Your WordPress Site?
- Cloaking Affiliate Links – Here’s a Quick Way To Do It
First of all let me share some basic principles on affiliate marketing:
- If you are using some valuable services and wanted to share the same with your users then it’s always a good idea to refer using affiliate link.
- Over usage of affiliate links on blog may kill your blog and user base.
- Earning money from affiliate links should never be your goal. You have to focus on your contents. Follow Google Webmaster tutorial for more details on
- You should never refer to a friend / user to a service which you never used in the past.
- Please stay away from SPAM affiliate services.
- It’s perfectly fine for users to know that you are referring via affiliate links. Please don’t try to fool visitors.
What is Cloak URL?
Let’s start with a sample.
- Affiliate link: https://shareasale.com/r.cfm?b=1320634&u=528889&m=41388&urllink=&afftrack=
- Cloak link: https://crunchify.me/genesis
There are two ways you could create Cloak URLs:
- Without Plugin using
.htaccessway -> We are going to follow
- With WordPress Plugin
I prefer not to install additional plugin for this usage. We will go over all detailed steps on how to create successfully Cloak URLs with some basic rules in mind.
URL Slug you want in your URL, i.e.
On Crunchify we were using
/go/. We recently moved to bit.ly cloaked URL. But this tutorial still works perfectly without any issue.
Get list of all your affiliate links and
choose your related URL name. Sample.
https://crunchify.me/bluehost for URL http://www.bluehost.com/track/crunfy/ https://crunchify.me/genesis for URL https://shareasale.com/r.cfm?b=1320634&u=528889&m=41388&urllink=&afftrack= ... ... have this list ready if you have more affiliate links
.htaccess file located at your blog’s base directory. Commonly located at under
public_html folder. You may see bunch of things in that file. I’ve written a article on How to speed up WordPress and by following that tutorial we have added lots of things into it.
Please make a copy of it. This is important 🙂
.htaccess file with below content.
## AFFILIATE LINKS ## Redirect 302 /go/bluehost http://www.bluehost.com/track/crunfy/ Redirect 302 /go/genesis https://shareasale.com/r.cfm?b=1320634&u=528889&m=41388&urllink=&afftrack= Redirect 302 /go/wpengine https://wpeng.in/crunchify/ ... ... add all entries
We are using HTTP
302 redirection. A
302 redirect, or also known as a
temporary redirect, should be put in place if you want to redirect your site visitors into another webpage but you plan to bring the redirected page back after some time.
robots.txt file and
disallow all /go/ URLs. You don’t want Google to index all your Cloaked URLs.
Check your changes by going to URL
Make sure you change to your domain name.
Now you are all set to place your affiliate cloaked URLs. Check your URLs on your site.
If you want you could also add
rel=nofollow to your affiliate Cloak links. Follow this tutorial if you want to get some detailed information on rel=”nofollow”.
This is just a one time process and you are all set. There are number of other WordPress Plugins also available but I want to setup this at very robust and faster way. Check out below screenshot. Redirection in
52 ms. It’s lightning fast.
Plugins like Redirection, ThirstyAffiliate, etc are very good but those needs to be booted with WordPress and those are not as fast as .htaccess redirection.