In our last post we told you about link cloaking and how it is done. That we have done using the WordPress plugins.

In last post we told you that this link cloaking is done by two methods. So, if you don’t want to install more plugins then you can cloak your links using .htaccess file. This method is very easy and here we will guide you to do the same.

As we all know that .htaccess file is very important in WordPress and using this file we can easily cloak affiliate links. To know how; follow given below steps.

How to Cloak your Affiliate links in WordPress without plugins

Cloak your Affiliate links in WordPress

Step 1

First all you have to decide URL slug for affiliate links like /refer/, /go/, /recommend/, etc.

Step 2

First of make list of all the affiliate links which you are using on your site and choose related URL name for URL for

Step 3

In your base directory under public_html folder .htaccess file is located, so open it. Here we have to make some changes, so before make changes copy this file for safety

Step 4

Now update this file with below content. Just add this to file and don’t delete anything


Redirect 302 /refer/bluehost

Redirect 302 /refer/hostgator

continue with all links

Here we are using 302 redirection which is also known as temporary redirect. This can be placed if you want to redirect visitors to another page and then planning to bring redirected page back after some time to your page.

Step 5

Now open robots.txt file and add disallow all refer URLs and for that add this line

Disallow: /refer/

NOTE: Here in place of /refer/ you have to use the same word which you have selected in step 1 for URL slug

NOTE: Make sure that you have to make all affiliate links no follow and for that you have to add rel=”nofollow” after each and every link

So this is how you can cloak your affiliate links in WordPress without WordPress plugins. If you found this info helpful, then kindly share this with others also. Also comment us and share your views.

Cloak your Affiliate links in WordPress without plugins

One thought on “Cloak your Affiliate links in WordPress without plugins

  • June 1, 2015 at 6:27 am

    If some one wants expert view concerning blogging and site-building after that i propose him/her to pay a visit this web site, Keep up the
    fastidious work.


Leave a Reply

Your email address will not be published. Required fields are marked *