Link Cloaking Plugin for WordPress
I’ve created a plugin for WordPress that can cloak outgoing links in your posts and/or pages.
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.
- Configure the URL – you can set the “prefix” part of the URL (see examples below).
- 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.
- As of version 1.1, static link cloaking.
New! The premium version of this plugin is now available and includes several new features :
- Cloak links in any part of your site, including the comment section and the sidebar.
- Works with plugin-created links.
- Five new cloaking types – for example, you can display the cloaked URL in a frame, or use a special redirect that hides the referrer.
- Improved link management and click statistics.
- Free automatic updates.
- And more. Check out EclipseCloaker.com for complete details.
Examples
Here’s a link explicitly tagged for cloaking -
<a href="http://evil-guide.tripod.com/"><!--cloak-->A Cloaked Link</a>
And here’s what it looks like in the post – A Cloaked Link
If you have configured the plugin to cloak all links (the default) you don’t need the <!–cloak–> tag inside your links.
Installation
- Download the link-cloaking-plugin.zip file.
- Unzip the file.
- Upload the `link-cloaking-plugin` folder to the `/wp-content/plugins/` directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- (Optional) Go to Settings -> Link Cloaking and modify the default settings to your liking.
- Re-save your permalink settings to insert the plugin’s link redirection code to the WordPress .htaccess file : go to Settings -> Permalinks and click “Save Changes”.
Download
Version 1.8.2 : link-cloaking-plugin.zip (10 KB)
Requirements :
- WordPress 2.8 – 3.0.1
mod_rewrite. If “pretty permalinks” work on your blog then you probably have this already.
@White Shadow –
Oh, THANK YOU!!!! Something so simple and it worked like a charm – AND saved me a ton of work!!!!
Jennifer
~PotPieGirl
@PotPieGirl – Glad to help
Would be nice to have. “Cloak all links except tagged with ”
@Mario – Yes, yes…
Thought I’d mention. I just started a wordpress 2.7 blog. I used the link cloaker plugin but it wouldn’t work.
So I resaved my permalinks and it worked fine, anyone having 2.7 problems should try resaving permalinks. Got the tip above, thanks.
Hi… AWESOME PLUGIN!
Works great… I just thought I’d mention that I also use Blog Mechanics Keyword Linker Simply because it is not case restrictive and adds a “no-follow” to the links. (http://www.dijksterhuis.org/wordpress-plugins/keyword-link-plugin/)
However, I notice that Link Cloaker won’t cloak the links that BM Keyword Link generates… any thoughts on that?
@Michael Smith – As a rule, this plugin won’t cloak links generated by other plugins. This is because it would be very hard to detect those links.
[...] sites that will either be flipped, or that I want to keep separate from my main sites, the free Link Cloaking Plugin is a brilliant [...]
first of all: thank you for the plugin!
is there a chance to use wild-cards in the “cloaked links”?
merry christmas!
@Marc – I’ll add that to the idea list
@White Shadow – Nice!
I use this great plugin but some links createt with the plugin AmazonSimpleAdmin doenst work. They only link to my Site.
How can I fix this?
AmazonSimpleAdmin is from here: http://www.ichdigital.de/amazonsimpleadmin
Please help me
Hi Everyone
anyone else having problems with the plugin and the new version of wordpress? I just noticed that all my links inside my posts are not working anymore so I had to turn off the plugin.
Let me know if anyone else is having this problem.
Thanks
Edson
@Edson – As someone suggested a few comments below, try updating permalinks again. That should help.
[...] Link Cloaking Plugin: Özellikle bol dış link verdiğiniz sitelerde veya affiliate programları tanıtımı yaptığınız sitelrde link adresini saklaması nedeni ile çok faydalı. Tek eksiği istatistik tutmaması ve aynı başlık altındaki terimlere ortak bir link belirleyememesi Umarım ileride bu özellikler eklenir. [...]
@ YourDealz.de – I repeat : no, this plugin won’t cloak links generated by other plugins. This is not a bug. It simply can’t be done in the current implementation.
White Shadow, thank you for a great plugin. I have it configured and working on my blog, now I am having a weird problem on another blog I am configuring. Is it possible that it works properly with some WP themes but not with others? For this new blog I am configuring I decided to use AjaxBerlee theme and it doesn’t work with it. If I select some other theme it appears to be working fine. This theme uses AJAX, so the URL doesn’t always change in the address bar when you navigate posts and pages of the blog. Clicking on any external cloaked links gives me a page not found message. Any thoughts?
I’m guessing the theme uses some non-standard mechanism for loading posts and the plugin can’t figure out which post/page is currently visible, leading to invalid cloaked links. I’ll take a look at the theme tomorrow, but can’t promise anything – analysing other people’s code usually isn’t easy.
I ended up using a different theme. I just wanted to give you heads up and I was curious what you think might be causing this. I think using these AJAXy themes could hurt my SEO ratings anyways, that’s why I switched themes.
Ahha, I actually didn’t get anywhere with that theme. And I agree that AJAX is probably bad for SEO.
Great help, thanks.
Plugin tested with WP 2.7 and it works though you will need to update the permanent link tab once you have upgraded to 2.7.
The plugin looks great, but I have slightly different requirements. Can you point me to a plugin that would actually CHANGE the outgoing links (not just cloak them for the user) to links pointing to my own domain?
So basically I’m blogging using an RSS feed and the posts contain lots of outgoing links. I’d like these links to be changed to http://www.mydomain.com/link-1234.html or something which would then re-direct users to the actual page. I’m guessing this would have some SEO benefit by not having too many outgoing links in the posts.
Is my logic here wrong, or is there a plugin that does this?
Thanks!
I think your logic is a bit confused, yes.
You want a plugin that will rewrite all external links to look like internal ones. However, when the user clicks on such link, they should be redirected to the actual external page. As I see it, this is exactly what Link Cloaker does (except the URLs don’t end in .html).
Or did you perhaps mean that you want a plugin that would create actual HTML pages that contain nothing but a meta redirect/Javascript redirect? IMHO that would have no SEO benefit and would look weird from the user’s perspective.
If your main concern is SEO and having too many external links, just check “Nofollow cloaked links” in the plugin’s configuration. This way the cloaked links won’t “count” from the search engine’s perspective.
Plugin tested with WP 2.7 and works just fine.
Still there is a problem with the images. Let me explain.
I use two plugins for them.
jQuery-Lightbox(http://www.pedrolamas.com/projectos/jquery-lightbox) and Add Lightbox (http://mdkart.fr/blog/plugin-add-lightbox-pour-wordpress/)
The Add Lightbox plugin automatically adds the rel=”lightbox[ID_OF_THE_POST]” to images linked in a post using the code href=(‘|\”)([^>]*).(bmp|gif|jpeg|jpg|png)(‘|\”)(.*?)>(.*?)/i. BUT it cannot do that since they have already being cloaked.
Any way of getting the lot working in harmony/
Thanx in advance. Great work
Your cloaker works fine for affiliate links in the posts. However, I noticed that the affiliate links are NOT cloaked in the side widgets.
How can I do this?
Thank you,
John
@ uhubuhu : That’s a bit hard to fix properly in the current release. As a workaround, giving the cloaking hook a later priority might help. To do that, open wplc_link_cloaking_plugin.php and on line 38 change the 2 to 20. The new line should look like this :
@ John : Currently this plugin can’t automatically cloak links in widgets. However, you could create “static” cloaked links (Tools -> Cloaker Links) and use the cloaked URLs in the widgets.
This plug in looks great! Does it also have click tracking so you can track how many people are clicking your affiliate links?
@ Todd : Yes, but only for “static” links, i.e. automatically cloaked links aren’t tracked.
Hey. I’m having a bit of a problem with the plugin on WordPress 2.7. I’m trying to cloak my links in the side bar. I’ve used the static cloaking tool and have manually copied and pasted the links into the blogroll, but I get a 404 error when clicking on the links. Any ideas?