Link Cloaking Plugin for WordPress

This is a plugin for WordPress that can automatically cloak outgoing links in your posts and/or pages.

Download plugin
(Note: May not be compatible with the latest version of Eclipse Link Cloaker.)


  • Choose what to cloak – all links, only the links you specify or no links at all.
  • Choose where to cloak – posts, pages or both.
  • Exception list – links pointing to domains in this list will not be cloaked. For example, this is useful if you have chosen to cloak all links but don’t want to cloak the links to your own domains.
  • Compatible with all browsers – the link cloaker plugin doesn’t use JavaScript so it will work even for visitors that have disabled JS.
  • “Smart” cloaking – relative, ambiguous or malformed URLs will not be cloaked. Better safe than sorry.
  • If desired, you can also add your own cloaked links manually.


Lets say you’ve got a link you want to be cloaked.

<a href="">Cloak Me</a>

Once you install the plugin, it will automatically, without requiring any configuration, turn it into a cloaked link when it’s displayed to a visitor:

<a href="">Cloak Me</a>

Here’s a live example: Cloak Me

As an alternative to the fully automatic cloaking, you can switch the plugin to “selective cloaking” and tag the links you want to cloak manually:

<a href="">Cloak Me<!--cloak--></a>

Note: The plugin does not actually edit your posts or permanently modify your links. Instead, it switches them on-the-fly whenever someone views them on your site. When editing a post in the admin panel, you will see the original, uncloaked link.


Version 1.8.4 : (16 KB)

Requirements :

  • WordPress 2.8 – 3.3
  • mod_rewrite. If “pretty permalinks” work on your blog then you probably have this already.

(Note: May not be compatible with the latest version of Eclipse Link Cloaker.)


  1. Download the file.
  2. Unzip the file.
  3. Upload the `link-cloaking-plugin` folder to the `/wp-content/plugins/` directory.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress.
  5. (Optional) Go to Settings -> Link Cloaking and modify the default settings to your liking.


Why are some of my links not getting cloaked?

The most common possibilities are:

  • Links in the sidebar, header, comment area and so on can’t be cloaked by the free version of the plugin. It only works on links in page/post body. Upgrade to the premium version to cloak links anywhere on the page.
  • Links added using other plugins, theme features or custom fields are also supported only in the premium version.
  • JavaScript links, as well as Flash and context-sensitive ads are not supported by any version of this plugin.

Why are none of my links getting cloaked?

  • If using “Seletive cloaking”, make sure you have actually marked some links with the <!--cloak--> tag.
  • Double-check that the links in question aren’t added or modified by plugins, the theme, or custom fields.
  • Contact me. You might have found a bug.

The exception list doesn’t seem to work. What could be the problem?

Make sure to enter only domain names in the “Exceptions” box. For example, given a link like “”, the domain name is the “” part. So to prevent the plugin from cloaking that link, add “” (sans quotes) to the “Exceptions” box. Entering the full URL or “” will not work.

Additionally, if some of your links point to and some to, you will need to add both of those to the exceptions.

Why do some cloaked links redirect me back to my homepage?

Most likely, your post(s) contain links created or modified by other plugins, the theme, or custom fields. Either remove those links, or upgrade to the premium version.

Why do some cloaked links redirect me back to my homepage?

See the previous question.

Why do cloaked links display a “Not Found” error?

  • Make sure you’re using pretty permalinks.
  • Your .htaccess might be out of date. To update it, go to Settings -> Permalinks and click “Save Changes”.
  • Your hosting company may be blocking browser access to PHP files in the /wp-content/plugins/ directory, usually as a security measure. The free version of the plugin is not compatible with these hosts. Consider using the premium version instead.

I have a question not addressed in this FAQ. What should I do?

Either leave a comment below, or email me directly. My email address can be found on the contact page.

Related posts :

800 Responses to “Link Cloaking Plugin for WordPress”

  1. Max says:

    Thanks a lot for this plugin.
    You made my day. 🙂
    Kind regards,

  2. Cihuy says:

    I want to give advice.
    I hope to edition updates to the input “custome domain”

  3. Karilee says:

    Thanks, just got this set up. Exactly what I was looking for, and it made my first foray into cloaking affiliate links pretty painless.

  4. Miha says:

    Any way to set the default URL for all the posts?

    I would like to display “” all the time, regardless of which posts, page, site etc visitors are visiting…

  5. Kathryn says:

    Works great, thank you! 😉

  6. […] gibt aber auch Links, die ich maskieren wollte und dafür nutzte ich das Link Cloaking Plugin. Wichtig dabei zu wissen ist, dass man Ausnahmen hinzufügen muss, wenn man einzelne Links nicht […]

  7. Ben says:

    This plugin sounds too good to be true! Will it work for SEO purposes? i.e. will it disguise affiliate links to SE spiders because I’ve heard you can get penalized for affiliate links.

  8. Jānis Elsts says:

    Yes, if you enable the “Nofollow cloaked links” setting, search engines should ignore your affiliate links.

  9. iRONICbOY says:


    How can I make your Link Cloaking Plugin work with nginx instead of apache2?

    Sincerly yours

  10. Benny says:

    Help! I am using your script for a long time. But now I moved my webpage to another server (webhosting). Now the cloaked links do not work anymore.

    The cloaked links look like:

    If I click on a link, I get an error in my page and the link jumps to:

    I also looked in my .htaccess file but that looks good for me.

    # Link Cloaker Plugin BEGIN

    RewriteEngine On
    RewriteRule ^goto/([^/]*)/([0-9]+)/([0-9]+)/?$$2&link_num=$3&cloaked_url=$0 [L]
    RewriteRule ^goto/([^/]+)[/]?$$1&cloaked_url=$0 [L]

    # Link Cloaker Plugin ENDS

    any idea why the link cloaker does not work any more?

    Best Regards,

  11. Jānis Elsts says:

    @iRONICbOY :
    Sorry, I don’t know nginx well enough to answer that question.

    @Benny :
    It looks like something on your server is blocking direct access to PHP files in the /wp-content/plugins directory. Are you running any security-related plugins? Also, check the /wp-content and /wp-content/plugins directories for .htaccess files – one of them might contain the code that blocks access.

  12. […] Link Cloaking Plugin – This is a plugin can automatically cloak outgoing links in your posts and/or pages. […]

  13. Good post. I learn something new and challenging on websites I stumbleupon on a
    daily basis. It’s always helpful to read through articles from other authors and use something from other websites.

  14. Personally, I think that the Suede collection are best accessories for winter season.
    An ivory louis vuitton handbags Mahina perforated shoulder bag toted by Miley Cyrus
    or black Gucci Hysteria hobo by Ashley Greene is much easier to go
    with her blazing blue-and-green tank top plus black leggings.

  15. Manuel says:

    I was searching for a link cloaker for a new project. I’ve found your plugin and tried to use it in WP 3.5.2, but i think it’s not working.

    Is it possible in automatic-mode to mark some link as “do not mask”?


  16. Jānis Elsts says:

    Sorry, but this plugin is no longer maintained and hasn’t been updated in a while. It’s no wonder that it doesn’t work in the latest version of WP. I would recommend looking for other cloakers instead.

  17. Sanjay Patel says:

    Hello Admin,
    Thanking you for this great plugin. But I have a questions : How to cloack links in blogger blog ? this plugin does not work in blogger blog. so how can cloack all outgoing links same like this plugin in blogger? Please reply me .
    Thanks again.

Leave a Reply