,

How to Hide (Cloak) Affiliate Links in WordPress the Easy Way

How to hide affiliate links in WordPress

Raw affiliate links are long, ugly, and hard to manage. Here is a typical one:

https://www.example-network.com/r.cfm?b=346200&u=928612&m=28169&urllink=

A cloaked (or branded) link turns it into something short and clean, like yourblog.com/go/product/. The easiest way to do this in WordPress is with a link management plugin. Here is why and how.

Why Cloak Affiliate Links?

  • They look cleaner and more trustworthy to readers.
  • They are easy to remember and share.
  • You can update a link in one place. If a program changes your link, you change it once instead of editing dozens of posts.
  • You can track clicks to see which links perform best.
  • The plugin can add the right rel attributes (nofollow and sponsored) automatically.

Important: cloaking hides the messy URL, not the fact that it is an affiliate link. You still need a clear disclosure near your links to follow FTC rules and the terms of most affiliate programs. Some programs, like Amazon Associates, also have rules about cloaking, so check their terms.

Best Plugins to Cloak Affiliate Links

PluginFree versionHighlights
ThirstyAffiliatesYesLink categories, auto rel attributes, click stats
Pretty LinksYesVery popular, simple, also a URL shortener

ThirstyAffiliates is what we use here at RoadToBlogging, and it is the one used in this tutorial. Pretty Links works in a very similar way. For more options, see our list of the best affiliate marketing plugins for WordPress.

How to Hide Affiliate Links With ThirstyAffiliates

Step 1: Install and activate the plugin

Go to Plugins > Add New, search for ThirstyAffiliates, then click Install and Activate. Need help? See how to install a WordPress plugin.

Step 2: Choose your link prefix

Go to ThirstyAffiliates > Settings > Link Appearance. The link prefix is the word that appears before each link slug. We use “go”, so links look like yourdomain.com/go/product/. Other common choices are “recommends” or “refer”. Pick one and stick with it, because changing it later can break links.

ThirstyAffiliates link prefix setting

Step 3: Set nofollow, sponsored, and new window

In the same Link Appearance tab, set links to use nofollow and open in a new window. Also add sponsored to the rel attributes. Google asks site owners to mark affiliate and paid links with rel=”sponsored” (nofollow is also accepted). Learn more in how and when to add nofollow to a link. Click Save Changes.

ThirstyAffiliates nofollow and new window settings

Step 4: Add your first affiliate link

Go to ThirstyAffiliates > New Affiliate Link. Enter the product name as the title, paste your affiliate URL into Destination URL, choose a category, and click Save Link.

Adding a new affiliate link in ThirstyAffiliates

Step 5: Use the cloaked link

After saving, ThirstyAffiliates shows the Cloaked URL. Use it in your posts, or insert links from the editor with the ThirstyAffiliates button. That is it, your affiliate links are now clean and easy to manage.

Cloaked affiliate link in ThirstyAffiliates

Want more tips? Read how to manage affiliate links in WordPress.

Frequently Asked Questions

Is cloaking affiliate links allowed?

Most affiliate programs allow it, but some, such as Amazon Associates, have rules about how links are displayed. Always check your program terms, and always disclose affiliate links to readers.

Does cloaking affiliate links hurt SEO?

No, as long as the links use rel=”sponsored” or rel=”nofollow”. Link plugins can add these automatically.

Should affiliate links be nofollow or sponsored?

Google recommends rel=”sponsored” for affiliate and paid links. rel=”nofollow” is also accepted. Many sites use both.

What happens to my links if I deactivate the plugin?

Cloaked links stop redirecting and show a 404 error. Keep the plugin active, or replace the links before removing it.

Comments

10 responses to “How to Hide (Cloak) Affiliate Links in WordPress the Easy Way”

Leave a Reply

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

  1. Rahul Avatar
    Rahul

    How to show each ad on each post?

    1. Istiak Rayhan Avatar
      Istiak Rayhan

      If you want to show specific widget on specific post, you can use Clever Widget.

  2. Anuj godara Avatar
    Anuj godara

    Nice article sir. Your writing is always appreciate.

    1. Istiak Rayhan Avatar
      Istiak Rayhan

      Thanks for the kind words.

  3. Usman Avatar
    Usman

    Hey, thanks for the plugin.

    Pls. let me know which one is best? this one OR pretty link.

    Pretty link auto index the cloaked link in search engine, what the solution of it?

    1. Istiak Rayhan Avatar
      Istiak Rayhan

      Thirsty Affiliate is better. You can stop indexing affiliate link by using robots.txt file. Just disallow the prefix on robots.txt file. If your prefix is “go”, add the line “Disallow: /go/” on your robots.txt file.

      Read: How to Edit Robots.txt File.

      1. Usman Avatar
        Usman

        Hey Istiak,

        Thanks for reply, am using yoast plugin and nofollow the thirsty affiliate links there. Its enough? or I need to add this line(Disallow: /go/) in robots.txt

        1. Istiak Rayhan Avatar
          Istiak Rayhan

          Yes, it’s enough. I basically did two things.

          1. Excluded affiliate links from the the sitemap by using Yoast. (check here)
          2. Disallowed prefix in robots.txt file. (Check here)

          Now I don’t have to make affiliate links nofollow all the time.

  4. Mukesh Negi Avatar
    Mukesh Negi

    Hi Istiak,

    This is something which I was searching on Google, but I think Thirsty Affiliate is paid. Is that any free plugin available?

    1. Istiak Rayhan Avatar
      Istiak Rayhan

      Thirsty Affiliate is a free plugin that has premium add-ons. You can use main plugin for free.