Title: Cloak Affiliate Links for WooCommerce
Author: datafeedr
Published: <strong>December 21, 2013</strong>
Last modified: October 5, 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/woocommerce-cloak-affiliate-links.svg)

# Cloak Affiliate Links for WooCommerce

 By [datafeedr](https://profiles.wordpress.org/datafeedrcom/)

[Download](https://downloads.wordpress.org/plugin/woocommerce-cloak-affiliate-links.1.0.39.zip)

 * [Details](https://pcm.wordpress.org/plugins/woocommerce-cloak-affiliate-links/#description)
 * [Reviews](https://pcm.wordpress.org/plugins/woocommerce-cloak-affiliate-links/#reviews)
 *  [Installation](https://pcm.wordpress.org/plugins/woocommerce-cloak-affiliate-links/#installation)
 * [Development](https://pcm.wordpress.org/plugins/woocommerce-cloak-affiliate-links/#developers)

 [Support](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/)

## Description

The _Cloak Affiliate Links for WooCommerce_ 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.

## Screenshots

[⌊Settings⌉⌊Settings⌉[

Settings

[⌊Permalinks⌉⌊Permalinks⌉[

Permalinks

## Installation

This section describes how to install the plugin and get it working.

 1. Upload the `woocommerce-cloak-affiliate-links` folder to the `/wp-content/plugins/`
    directory.
 2. Activate the _Cloak Affiliate Links for WooCommerce_ plugin through the ‘Plugins’
    menu in WordPress.
 3. Configure the plugin by going to Settings > WC Cloak Links.

## FAQ

### What redirect status should I use, 301, 302 or 307?

There’s a lot of debate about this. I would suggest Googling this and seeing which
works best for you. The default status is 302.

## Reviews

![](https://secure.gravatar.com/avatar/344a28494732ee1b146821774324db65d6a399e6d8e9af1b18a3a9ef55d761a0?
s=60&d=retro&r=g)

### 󠀁[Has problem with All Import data feed](https://wordpress.org/support/topic/has-problem-with-all-import-data-feed/)󠁿

 [borgcollective](https://profiles.wordpress.org/borgcollective/) March 8, 2023 
5 replies

Plugin has problem with cloaking affiliate links when data feed imported through
All Import plugin into woocommerce. All old product imports finished before cloaking
addon installation does fine and when clickon button it leads you where it should.
However , when cloaking addon is active while importing products through data feed,
addon just sets cloaking link instead affiliate link and on click doesn't lead anywhere…
And if you disable addon , those cloaking links stay permanently on product unless
you rerun your product feed again so it can update aff links. Other products which
are imported before plugin activation and they were cloaked with new permalink after
plugin deactivation returns original url. Although , if you run WP All Import manually
addon works flawlessly. It seams that only has problem with feeds scheduled with
Cron jobs

![](https://secure.gravatar.com/avatar/a15be6609274106c0eab03449bd68c86122c816be044bbd80fed526c2818ed4b?
s=60&d=retro&r=g)

### 󠀁[Seo](https://wordpress.org/support/topic/seo-229/)󠁿

 [Karol](https://profiles.wordpress.org/somrafka/) September 18, 2021 4 replies

Will SEO improve when I disable external links?

![](https://secure.gravatar.com/avatar/90fe93376d6528d05f13973cc61c63bc0f5d88525fd007304ac54033f4f650ff?
s=60&d=retro&r=g)

### 󠀁[The plugin works the best!](https://wordpress.org/support/topic/the-plugin-works-the-best/)󠁿

 [ilyapokrov](https://profiles.wordpress.org/ilyapokrov/) December 9, 2020

Do not pay attention to the fact that the plugin has few active installations at
the moment. It is truly the best in its segment. There is no need to configure anything–
I activated the plugin and the problem is solved. Even though 5 stars is the maximum
rating, I will rate it 10 stars! Highly recommend!

![](https://secure.gravatar.com/avatar/9d26859af5af6ed1aa35f8b64fdd1556c7d9500f8c4595ece02341c4e697da5f?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-26060/)󠁿

 [Kaudo](https://profiles.wordpress.org/kaudo/) May 12, 2020

Set and forget solution.

![](https://secure.gravatar.com/avatar/49bc79ad5aaadb0ab89798470c4a113360e1fc88e52e0308e6b19438e8ea3133?
s=60&d=retro&r=g)

### 󠀁[THANK YOU!](https://wordpress.org/support/topic/thank-you-1573/)󠁿

 [Volvera](https://profiles.wordpress.org/emresert86/) March 11, 2018 1 reply

This is exactly what I needed.

![](https://secure.gravatar.com/avatar/9e5773a73c17e686b675024f4d82c0be99827e0641754f51ebad567e8e32dac3?
s=60&d=retro&r=g)

### 󠀁[Awesome plugin!](https://wordpress.org/support/topic/awesome-plugin-3155/)󠁿

 [Joseph](https://profiles.wordpress.org/xmsmmgrs/) November 4, 2017 1 reply

I use it for some time now and I am very happy with it! Thanks!

 [ Read all 12 reviews ](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/)

## Contributors & Developers

“Cloak Affiliate Links for WooCommerce” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ datafeedr ](https://profiles.wordpress.org/datafeedrcom/)

[Translate “Cloak Affiliate Links for WooCommerce” into your language.](https://translate.wordpress.org/projects/wp-plugins/woocommerce-cloak-affiliate-links)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/woocommerce-cloak-affiliate-links/),
check out the [SVN repository](https://plugins.svn.wordpress.org/woocommerce-cloak-affiliate-links/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/woocommerce-cloak-affiliate-links/)
by [RSS](https://plugins.trac.wordpress.org/log/woocommerce-cloak-affiliate-links/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.39 – 2026/10/05

 * Security: cloaked links only redirect for published, non-password-protected products(
   or users who can read the product). New `wccal_is_redirect_allowed` filter.
 * Security: the redirect only follows http and https URLs.
 * Security: settings and the “Affiliate link base” are validated on save.
 * Security: escaped admin output.
 * Fix: saving an external product outside the WordPress Admin Area (REST API, cron)
   no longer stores the cloaked URL as the product URL.

#### 1.0.37 – 2025/09/15

 * Changed plugin name to comply with WooCommerce’s trademark.

#### 1.0.36 – 2024/12/30

 * Fixed CSRF issue

#### 1.0.35 – 2024/07/05

 * Updated “tested up to” value

#### 1.0.34 – 2024/03/18

 * Updated permalink saving.

#### 1.0.33 – 2023/11/10

 * Updated “tested up to” value
 * Declared WooCommerce HPOS compatibility

#### 1.0.32 – 2023/05/02

 * Added 2 public properties to `Wccal` class.

#### 1.0.31 – 2023/04/20

 * Updated “tested up to” values.

#### 1.0.30 – 2022/10/28

 * Updated “tested up to” values.

#### 1.0.29 – 2021/08/09

 * Added `wccal_product_url_permalink` filter.
 * Added `wccal_product_url_qs` filter.

#### 1.0.28 – 2021/07/13

 * Forgot one small change in last update.

#### 1.0.27 – 2021/07/13

 * Updated to support WordPress 5.8.
 * Updated to support WooCommerce 5.5.

#### 1.0.26 – 2020/03/08

 * Updated to support WordPress 5.7.

#### 1.0.25 – 2020/12/01

 * Updated to support WordPress 5.6.

#### 1.0.24 – 2020/09/30

 * Updated to support WooCommerce 4.5.

#### 1.0.23 – 2020/07/27

 * Updated to support WooCommerce 4.3.

#### 1.0.22 – 2020/03/11

 * Updated to support WooCommerce 4.0.

#### 1.0.21 – 2019/11/12

 * Updated readme.

#### 1.0.20 – 2019/08/20

 * Updated for WooCommerce 3.7

#### 1.0.19 – 2019/05/06

 * Updated readme.

#### 1.0.18 – 2019/04/23

 * Updated readme.

#### 1.0.17 – 2019/02/19

 * Updated readme.

#### 1.0.16 – 2018/12/07

 * Updated readme.

#### 1.0.15 – 2018/07/30

 * Disables cloaking of URLs during WooCommerce Product Exporting.

#### 1.0.14 – 2018/03/14

 * Declared required and supported WooCommerce version.

#### 1.0.13 – 2018/03/13

 * Updated readme file.

#### 1.0.12 – 2018/01/17

 * Added README file for GitHub.

#### 1.0.11 – 2017/11/30

 * Fixed compatibility issue with WooZone.

#### 1.0.10 – 2017/09/29

 * Fixed woocommerce_product_class() so that Wccal_Product_External is returned 
   when the admin-ajax.php is requested from the frontend.

#### 1.0.9 – 2017/05/01

 * Changed `woocommerce_clean()` to `wc_clean()`.

#### 1.0.8 – 2017/04/18

 * Fixed bug introduced with WooCommerce 3.0+ where affiliate link was being rewritten
   on product edit page in the WordPress Admin Area.

#### 1.0.7 – 2017/03/20

 * Changed `get_site_url()` to `home_url()` to fix [this error](https://wordpress.org/support/topic/im-getting-404-on-all-the-cloaked-links/#post-8936140).

#### 1.0.6 – 2017/02/16

 * Added `$context` argument to `get_product_url()` method to support changes in
   WooCommerce 2.7.

#### 1.0.5

 * Just updating readme.

#### 1.0.4

 * Added user_trailingslashit() function to returned redirect URL. (#9588)

#### 1.0.3

 * Updated ‘tested up to’ tag.

#### 1.0.2

 * Added “static” to static methods to meet Strict Standards.
 * Updated plugin information.

#### 1.0.1

 * Changed author name to “datafeedr.com”
 * Flushed rewrite rules on plugin activation/deactivation.

#### 1.0.0

 * Initial release.

## Meta

 *  Version **1.0.39**
 *  Last updated **1 month ago**
 *  Active installations **1,000+**
 *  WordPress version ** 4.7.0 or higher **
 *  Tested up to **7.1.4**
 *  Language
 * [English (US)](https://wordpress.org/plugins/woocommerce-cloak-affiliate-links/)
 * Tags
 * [affiliate links](https://pcm.wordpress.org/plugins/tags/affiliate-links/)[cloak](https://pcm.wordpress.org/plugins/tags/cloak/)
   [external](https://pcm.wordpress.org/plugins/tags/external/)[mask](https://pcm.wordpress.org/plugins/tags/mask/)
   [redirect](https://pcm.wordpress.org/plugins/tags/redirect/)
 *  [Advanced View](https://pcm.wordpress.org/plugins/woocommerce-cloak-affiliate-links/advanced/)

## Ratings

 4.3 out of 5 stars.

 *  [  9 5-star reviews     ](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/?filter=3)
 *  [  2 2-star reviews     ](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/reviews/)

## Contributors

 *   [ datafeedr ](https://profiles.wordpress.org/datafeedrcom/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/woocommerce-cloak-affiliate-links/)