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. Florian says:

    Awesome plugin, handle thousands of links across all my blogs, like a clockwork!

  2. Beo says:

    This is very good plugin. I like very much. Thanks so much.

  3. Kortingscode says:

    Thanks for this plugin, used it and works correctly.

  4. I’m going to try the free version first, but after reading some of the earlier comments about rss feeds, could you tell me if your paid plugin works with ebay rss feeds? I use simple pie to populate some of my blogs, but haven’t been able to cloak them. Google hates these links and the serps reflet their hate for them, especially since there are many of them.

    I’d love to find a plugin that works with either simple pie, or rss feeds in general.

  5. Marc says:

    This was easy. Thanks White Shadow for a great FREE plug-in!

    Uploaded it, activated it, saved my permalinks…

    DONE.

  6. White Shadow says:

    Assuming the RSS feeds contain normal HTML links (as opposed to JavaScript widgets or IFrames disguised as links), they should work fine with the paid version.

  7. I also use simplepie for my rss feeds from a ticket site and the plug-in (paid version) works great. See an example here:

    http://atlantageorgiaconcerts.com/concerts/

  8. Claire says:

    Is this a problem from a Google perspective that the hop link stillshows in the url bar?

  9. White Shadow says:

    If the links are no-followed, Google most likely won’t care.

  10. Really great tool! Thanks

  11. Max says:

    It’s a hell of a plugin, if you are using wordpress for PPC landing pages it’s almost a must have!

  12. […] Link Cloaking Plugin […]

  13. Richard Young says:

    Can someone post an example of the .htaccess file for this plugin.

    For some reason my .htaccess is not being updated by wordpress even though it has write access with 666 when I save permalinks.

    I even had to add the code for the permalinks manually.

    Thanks!!

  14. White Shadow says:

    Here’s an example :

    # Link Cloaker Plugin BEGIN
    
    RewriteEngine On
    RewriteRule ^more/([^/]*)/([0-9]+)/([0-9]+)/?$ http://example.com/blog/wp-content/plugins/link-cloaking-plugin/wplc_redirector.php?post_id=$2&link_num=$3&cloaked_url=$0 [L]
    RewriteRule ^more/([^/]+)[/]?$ http://example.com/blog/wp-content/plugins/link-cloaking-plugin/wplc_redirector.php?name=$1&cloaked_url=$0 [L]
    
    # Link Cloaker Plugin ENDS

    The plugin code should be placed above the WP .htaccess code.

  15. Norm says:

    Hi,

    I’ve installed the plugin but keep getting this http://pickoffers.com/shop/link/145/1 instead of the cloaked post name url. I’ve gone through the posts on here and have modified the .htaccess file, updated the permalinks and have even deactivated all my plugins but still none the closer.

    What do I need to send you to try and get the cloaked links working on my site?

    Cheers.

  16. White Shadow says:

    The URL you mention is a cloaked URL, so I’m not sure I understand your problem.

  17. Sutton Cheney says:

    Hi White Shadow,
    I have installed your Link cloaking plugin for WordPress. I’m VERY pleased to say that the banner link in a post to a website that I am trying to affiliate to has now been cloaked -automatically too! I have been struggling for hours trying various cloaking plugins with no success whatsoever until I found yours via a Google search.

    I still have a problem however, I hope you can advise me in layman’s one-step-at-a-time terms how I cloak a banner link in the SIDEBAR of this post that is pointing to the same affiliation. I can not understand why this sidebar banner link is not cloaked whereas the banner link in the body of the post is cloaked.

    Please help!
    Sutton Cheney

  18. White Shadow says:

    The free version of the plugin doesn’t automatically cloak sidebar links. You’d need to get the paid version to do that.

    That said, you can use the free version to cloak the sidebar links manually :
    1. Go to the Tools -> Cloaked Link tab. You’ll see a form for adding “static” links.
    2. Take the normal, uncloaked URL of the sidebar link and copy it to the “Destination URL” field.
    3. Enter a name of your choosing for the cloaked link. This name will show up in the cloaked URL.
    4. Click “Add”.
    5. Find the newly added cloaked link in the link table on the same page and click the “show cloaked url” thingy to display the cloaked URL that the plugin generated for that link.
    6. Edit the sidebar link and replace its original URL with the cloaked one.

    Repeat the process to manually add more cloaked links.

  19. Norm says:

    From what I understand I can choose to have the postname within the cloaked url. Instead of the link previous (http://pickoffers.com/shop/link/145/1 ) it would be http://pickoffers.com/shop/verseo-cordless-air-pressure-leg-massager/145/1 . I done everything which I have read on this comments but still can’t the link to show the post name instead of the word “link”.

  20. Norm says:

    Sorry just as a quick side note, the link with the post name does work but it’s getting it to automatically show the post name in the cloaked link opposed to me manually having to go in change it is where is I’m having issues.

Leave a Reply