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.)

Features

  • 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.

Examples

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

<a href="http://example.com/?affiliate=me">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="http://yoursite.com/goto/Cloak_Me/12/34">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="http://example.com/?affiliate=me">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.

Download

Version 1.8.4 : link-cloaking-plugin.zip (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.)

Installation

  1. Download the link-cloaking-plugin.zip 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.

FAQ

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 “http://example.com/directory/page.html”, the domain name is the “example.com” part. So to prevent the plugin from cloaking that link, add “example.com” (sans quotes) to the “Exceptions” box. Entering the full URL or “http://example.com/” will not work.

Additionally, if some of your links point to example.com and some to www.example.com, 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 :

802 Responses to “Link Cloaking Plugin for WordPress”

  1. White Shadow says:

    No, it does not work with WP MU.

  2. […] 10. Link Cloaking Plugin Med Link Cloaking Plugin får du muligheden for at “skjule” dine affiliate links. F.eks. Normalt affiliatelink: http://www.partnersite.com/aff-id:86971246xxx ”Skjult” / Cloaked affiliatelink: http://www.affiliateskolen.dk/links/partnersite […]

  3. Anders Vinther says:

    Hello,

    I am hoping to use your excellent plugin with Virtual Multi Blog. This means all my sites will be sharing the same .htaccess file.

    Can the Link Cloaking modifications to the .htaccess file be rewritten so it does not explicitly mention the domain name?

    Perhaps using %{DOCUMENT_ROOT} or %{HTTP_HOST}?

    Thanks!!

  4. White Shadow says:

    I haven’t tried that myself, but I think replacing the explicit domain name with %{HTTP_HOST} could work.

  5. Anders Vinther says:

    Thanks… will give that a shot and report back if it works…

    Might be a few weeks before I get to try it out tho…

    Keep up the great work!

  6. Hello..
    Newbie here..
    question..
    Do I need to configure my affiliate URLS or is this an automatic thing.reason I ask..
    when I go to my settings page all I see is STATIC CLOAKED LINKS ..then ADD..
    what exactly do I have to do here..

    Hey as far as donations are concerned.. I make absolutely nothing on the internet..I dont mind handing out a helping hand..but not now..This marketing stuff is too difficult for me and I really dont know what I’m doing.. all I’m doing is trying.. so I would appreciate a little help.. in understanding exactly how to cloak..
    YES i have read your tutorial.. all I get is that its an automatic sort of thing and looking at your settings page ..its mostly a white blank page with no instructions..

    Appreciate any understanding..we all have to start someplace AY!

  7. White Shadow says:

    This is “an automatic sort of thing”, but you can also add links manually if you want. I’m guessing that you’re confused because you were looking at the Tools -> Cloaked Links page, which is not the settings page. The real settings page is at Settings -> Link Cloaking.

    In general, you don’t need to do anything special to start cloaking links with this plugin. Just activating it should be enough to make most of your in-content links cloaked.

  8. Anders Vinther says:

    Just a quick update on the Virtual Multi Blog and Link Cloaker combo…

    It works a treat 😉

    There is one trick to it though…. you have to copy the Link Cloaker addition to the .htaccess file and place it at the top without the comments and change your domain name to %{HTTP_HOST}…

    Whenever you set up a new blog Link Cloaker might overwrite it’s own settings in the .htaccess file, but the addition of the general lines at the top will work for any site you add…

    The downside is that if you use something like W3 Total Cache it can no longer figure out how to rewrite the .htaccess file automatically so you have to do this manually… but that is a small price to pay…

  9. StevenB says:

    I’ve been using this plugin for a couple of years and it is great. Thanks.

  10. […] or not, but, I rather like using these for tracking as well. I use this one for some things: Link Cloaking Plugin for WordPress | W-Shadow.com From what I understand, there is also another one called Pretty Link which tracks any link you […]

  11. […] other plugin that could do the same? I'm swayed towards Eclipse Cloaker as the free version here: Link Cloaking Plugin for WordPress | W-Shadow.com does most of what I want, I'm not entirely sure the other two do automatic cloaking which I need as […]

  12. […] 0 Times in 0 Posts I'm using this but would certainly be interested in learning how to do this cgi business: Originally Posted […]

  13. marikamitsos says:

    Hi. I am trying the LCP on a new site. It works fine inside the posts but will NOT cloak the very same links on the front page. Is this normal?
    I use wordpress 3.0.1 and LCP 1.8.2
    Thanx in advance

  14. White Shadow says:

    Have you enabled the “Cloak links in pages” option?

  15. marikamitsos says:

    Yes I did. I have all options checked.
    Cloak links in posts | Cloak links in pages | Nofollow cloaked links | Cloak All Links
    But even though, I did not think that the front page would be considered as a “page”.
    Anyway, no matter what, the links in front page do NOT get cloaked.
    Any thoughts? Thanx

  16. […] links manually so far, which is time consuming. Is the WordPress plugin here worth using? : Link Cloaking Plugin for WordPress | W-Shadow.com Finally, is there a plugin that allows you to manage affiliate links? Main worry is the frustration […]

  17. White Shadow says:

    How is your front page set up? Is it a static page, or does it show recent posts, or something else?

    One situation where the plugin wouldn’t cloak links on the front page is when the links come from the theme or another plugin, not from a page/post created in the WP post editor.

  18. Dolly says:

    Can you cloak links only in a specific category?

    I have 5 category and I want to cloak links in posts in Category 2 and 4, is that possible?

  19. White Shadow says:

    No, that is not currently possible.

Leave a Reply