How to Cloak Affiliate Links on Your WordPress Site (2023 Guide)
Are your affiliate links long, ugly and revealing too much information to your website visitors? Cloaking your links can help make them more user-friendly, protect your affiliate commissions, and even boost click-through rates.
In this step-by-step guide, you‘ll learn exactly how to cloak and manage your affiliate links in WordPress using the Pretty Links plugin. I‘ll also cover some best practices and potential issues to watch out for when cloaking links.
Let‘s get started!
What Is Affiliate Link Cloaking?
Link cloaking is a technique used to hide the destination URL of a link behind a redirect. The cloaked URL is typically shorter and "prettier" than the original link.
For example, instead of an affiliate link that looks like this:
https://www.affiliatesite.com/products/?ref=1234&campaign=summer
You could cloak it to look like this:
https://www.yoursite.com/go/product
A few key advantages of cloaking affiliate links:
Cleaner appearance. Cloaked links are easier to read and remember than long, complex URLs full of tracking parameters. This can increase trust and click-through rates.
Flexibility. If you need to change or remove an affiliate link in the future, you only have to update it in one place. The cloaked link can stay the same.
Analytics. Link cloaking tools like Pretty Links provide click tracking so you can see how each link is performing.
Security. Cloaking protects sensitive information in your affiliate links like account names and commission structures.
Processing. Some visitors are wary of clicking on obvious affiliate links. Cloaked links can circumvent this.
While not all affiliate programs allow link cloaking, for those that do it can be a powerful way to optimize your affiliate marketing efforts. Now let‘s look at how to set it up in WordPress.
How to Cloak Affiliate Links with Pretty Links
Pretty Links is the most popular link cloaking plugin for WordPress. It lets you quickly create clean, cloaked links and manage them all in one place.
The Pro version, which I‘ll be using for this tutorial, adds advanced features like link expiration, geotargeting, and more. There‘s also a free version of Pretty Links if you just need the basic link cloaking functionality.
Step 1: Install and Activate Pretty Links
First you‘ll need to purchase Pretty Links Pro and download the plugin ZIP file. Then, from your WordPress dashboard, go to Plugins -> Add New and click "Upload Plugin."
Choose the Pretty Links ZIP file and click "Install Now." Once the plugin is installed, click "Activate."
Step 2: Create a New Cloaked Link
Navigate to Pretty Links -> Add New. Enter a title for your link – this is just for your reference. Under Redirection, choose "Cloaked" if you want to hide the destination URL completely. "307" and "301" redirects will pass link juice while still showing the final URL.
Now paste your affiliate link in the Target URL field. Think carefully about the "Pretty Link" slug as this will be the URL visitors see. Ideally it should be short, descriptive, and include your target keyword if applicable.
Example:
Target URL = https://www.affiliate.com/product-x/?ref=1234
Pretty Link = https://www.mysite.com/go/product-x
Under Advanced Options you can:
- Set a nofollow attribute (recommended for affiliate links)
- Enable tracking so you can view link stats
- Automatically replace keywords with this link
- Set link to open in a new window
Once you‘re satisfied with the settings, hit "Update" and then "Publish" to activate the cloaked link. You can now use the Pretty Link anywhere you would have used the original affiliate URL.
Step 3: Cloak Multiple Links in Bulk
If you have a lot of links to cloak, Pretty Links Pro makes it easy with the Import/Export feature. Just make a spreadsheet with the following columns:
- Target URL (original affiliate link)
- Pretty Link (cloaked link slug)
- Nofollow (1 to enable, 0 to disable)
- New Window (1 to enable, 0 to disable)
Save file as CSV and go to Pretty Links -> Import/Export. Select your file and click Import.
Step 4: Manage and Track Links
The Pretty Links dashboard gives you an overview of all your cloaked links with click stats. You can quickly enable/disable links as needed.
To get more detailed reports, go to Pretty Links -> Reports. Here you can see a breakdown of your top links and referrers. With Pretty Links Pro you can even track conversions to calculate ROI.
Best Practices for Affiliate Link Cloaking
When implementing link cloaking on your affiliate site, keep these tips in mind:
Disclose affiliate relationships. Many countries have laws requiring disclosure when earning income from recommendations. Adding a simple "Affiliate Disclosure" message above cloaked links keeps you compliant.
Cloak links right away. Don‘t wait until you have hundreds of links to set up cloaking. It‘s much easier to cloak as you go along.
Keep slugs relevant. When possible, include a keyword in your cloaked link slug (i.e. /go/product-name). Avoid using raw numbers or random text.
Use link categories. Pretty Links lets you organize cloaked links into categories which is helpful if you promote various types of products.
Set up link expiration. If you‘re running a time-sensitive promotion, set those links to automatically expire so you don‘t keep sending traffic to dead pages.
Mark links as sponsored. For SEO purposes, any paid link (including affiliate links) should have the sponsored rel attribute. You can set this globally in Pretty Links settings.
Check with affiliate managers. Some programs don‘t allow any link cloaking, while others are okay with certain types of cloaking. Find out your program‘s rules before cloaking.
Alternatives to Pretty Links for Link Cloaking
Pretty Links is the most comprehensive option for link cloaking in WordPress, but it‘s not the only one. Here are a couple alternatives to consider:
ThirstyAffiliates – Another robust cloaking plugin with features like automatic keyword linking, geotargeting, and an Amazon-specific integration.
AAWP – If you primarily promote Amazon products, the Amazon Affiliate WordPress Plugin makes it easy to cloak and localize Amazon links. It can display product info right on your site too.
Cloaked.cc or Bitly – These non-WordPress tools can work if you just need basic cloaking or shortening abilities. But you won‘t get the same tracking features as using a plugin.
Adding an Affiliate Disclosure with Cloaked Links
In the U.S., FTC guidelines state that if you receive any compensation (including affiliate commissions) for recommending a product or service, you must disclose that to users. Many other countries have similar laws to protect consumers.
The good news is adding an affiliate disclosure to your WordPress posts is easy. First, decide on the disclosure statement you want to use, for example:
"This post contains affiliate links. If you purchase an item through one of my links I may earn a commission at no extra cost to you."
Then, use one of these methods to automatically insert it before any content with affiliate links:
Method 1: Add to WordPress Post Template
If you use the Classic Editor and your theme supports custom post templates, you can edit your single post template file. Look for single.php or page.php.
Before the post content, add:
Replace DISCLOSURE STATEMENT with your text. You may want to style the affiliate-disclosure class in your stylesheet.
Method 2: Use a Shortcode
For more flexibility, you can create a shortcode to insert the disclosure anywhere. Add this code to your theme‘s functions.php file or a custom plugin:
function affiliate_disclosure_shortcode() {
return ‘
‘;
}
add_shortcode(‘affiliate_disclosure‘, ‘affiliate_disclosure_shortcode‘);
Then, use the [affiliate_disclosure] shortcode before any section containing affiliate links.
Method 3: Use a Plugin
The Affiliate Disclosure Plugin lets you create multiple disclosures and display them automatically based on link URLs or categories. It works with Pretty Links and other cloaking plugins.
Wrapping Up
Cloaking your affiliate links is an easy way to boost the professionalism and performance of your WordPress affiliate site. In this guide, we covered:
- What affiliate link cloaking is and why it‘s beneficial
- Step-by-step setup of link cloaking using Pretty Links
- Important settings and best practices to follow
- How to add a disclosure when using cloaked affiliate links
- Pretty Links alternatives for managing affiliate links
Remember, not all affiliate programs allow link cloaking, so be sure to check your terms and conditions. And if you cloak links, always disclose your affiliate relationship to stay compliant with laws and maintain trust with your audience.
Have any other questions about affiliate link management in WordPress? Let me know in the comments!
Additional Resources:
- Affiliate Marketing for Beginners
- How to Choose the Best WordPress Theme for Affiliate Marketing
- 10 Best WordPress Plugins to Boost Affiliate Income
- How to Add Affiliate Product Boxes in WordPress (Step by Step)
