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.
Love the plug-in and it works great on the first site I tried it on, but on this second site it is not working the same. It is indeed cloaking all the links, but the links in the last paragraph I have listed in the Exception box, yet they are still being cloaked. I tried deactivating and reactivating, deleting and re-installing, and updating the Permalink structure, but I still get the same result. What else should I try?
Make sure you only enter the domain name in that box, not the entire URL. For example, “something.com” will work, but “htt://something.com/” and “http://something.com/page.html” will not.
I did that also. It is strange because when I used the plug-in on another site, about 6 days ago, it worked perfectly, even with the http:// prefix, but when I checked the site last night after having problems with my new site, I noticed that all the links were cloaked. I went in just now and removed the http:// from all the domains and the links are still showing up a cloaked.
I finally gave up last night and did selective cloaking, which is not quite as easy since there are more links that I want to cloak than not cloak, but it works. Not really sure what else to try at this point.
If I have an image that contains a link, is there a way to cloak that image link?
Hmm, it should’ve worked. Could you send me a few examples of the mistakenly cloaked links + a screenshot of your settings page? ( whiteshadow at w-shadow dot com )
Most image links can indeed be cloaked. You need to insert the selective cloaking code right after the image tag, but before the closing </a> tag.
Okay, email just sent. Thanks!
HI ,
I just downloaded the free version today, installed it and activated it on my website.
None of my links were cloaked so I am sure I left out a step or did something wrong.
I don’t quite understand the instructions regarding the permalinks. I already had permalinks set to a custom setting, /%postname%/ .
So, I am not sure what to do now at this point in order to get this to work.
Here are your instructions from above:
Re-save your permalink settings to insert the plugin’s link redirection code to the WordPress .htaccess file :
* WP 2.7 and above : Go to Settings -> Permalinks and click “Save Changes”.
I did everything after the *, but no links were cloaked.
Can you help me with this please?
That’s strange. Perhaps selective cloaking has somehow become enabled? Go to Settings -> Link Cloaking and make sure the “Cloak all links” option is ticked.
Also, could you show me some examples of the links that should be cloaked but aren’t?
Hi White Shadow,
Thanks! “Cloak all links” is checked.
I noticed that links within posts ARE cloaked. But links in my “links” area are not cloaked nor are the links in widgets that are in my side bar. The widgets contain are affiliate banner links with pictures imbedded. Is your plugin set to cloak those types of links?
Here is an example of a link that did not cloak in my links side bar area:
http://www.frrco.com/123268
But this same link IS cloaked when it appears in a post.
Any ideas here?
I appreciate you taking the time here to help me with this.
The free version of the plugin only cloaks links in post/page content. If you want to cloak sidebar widgets and such, you need to get the premium version
Thanks! I do like how it works on the posts. I might just have to buy the premium version then!
Hi,
Thanks for this plugin, its really great. I’m having a problem though that I haven’t seen having read through all the comments. The link cloaking plugin works fine for the posts on my site, however, when I create any static Cloaked Links, I get a 404? Seems odd as it should work for static links if the normal cloaked links work ok, any ideas? I have my permalinks changed, and the re-write section is at the top of my .htaccess file, and still 404′s on the static links, any ideas? I have a number of WP installs, and all act in the same manner, seems odd, can you help?
Here’s an example URL that isn’t working:
http://www.ancient-words-of-wisdom.com/wordpress/recommends/Test-Link/
But if you look on the homepage, there are working cloaked links there…
Thanks,
Mike.
This is a bug. I’ll have the fix out in a few hours.
Great, wonderful support, thanks for this, I look forward to the fix!
Thanks,
Mike.
Thanks all this info and download.zip
Regard
Keep blogging
I don’t have a problem with paid plugins vs free but you got to realize the free ones work very well. I do have a problem with over priced software and I don’t think many people will pay your price. Should have been less then half of that amount. Why is it worth so much in your mind? Pretty graphs of clicks? Google Analytics? naw, sorry no big deal.
I think the single thing that would tempt me is something you are not offering – it is something I have had a lot of trouble with.
Updates and compatibility.
If you where to give out an iron clad guarantee that you would accept the responsibility to stay on top of every wordpress update and make certain your plug-in was updated for the new version of wordpress out it would go a long way in my mind to assure me I was doing business with some one who realizes they have some responsibility after they take my money.
Without an iron clad guarantee I am buying a shiny new plug-in that will degenerate until it is worthless to me when you tire of supporting it in a few years. Then go off in another direction to pursue other things. You imply support and free updates but you do not state it boldly.
I own a small ISP and web hosting business and I know about customer support. I am the smallest ISP/web hosting company in our area and I have the best customer support of any local company I know of. I allow my customers to contact me ANY TIME they need my help.
I make a commitment to my customers. If I supply your broadband or host/build your website I will be there for you no excuses. The other companies simply wimp out on support. After 5:30 you get an answering machine with them. I answer the phone and help people no matter when or where I am and no matter what I am doing.
COMMITMENT to SERVICE and SUPPORT. No substitute….
###
Hiho and thanks for this nifty tool!
Is it possible that it has a little problem with WP3.0 MultiSite installations?
Install, settings, updating permalinks: all pretends to work fine without any error messages, but cloaked URLs all end up as 404s…
Bug or feature?
Cheers
Martin
MultiSite mode isn’t officially supported by the plugin, so… more like “feature suggestion”
It’s on my to-do list.
Hi there!
Thanks for an amazing plugin. However, I’ve run into a problem that I can’t seem to solve.
I’m trying to use the plugin to cloak Ebay links. These links are supposed to direct users to relevant parts of eBay.
Now when I enter the URL contained in the link into the browser directly, it goes properly to the search results I’ve defined in the link. But when I activate the plugin, all my links now go incorrectly to the eBay home page.
I’ve tried everything to get these to work properly, but to no avail. Do you know how I can get it to work?
Any help would be greatly appreciated. Thanks!
Could you show me a few example links?
Oops never mind…
I think I found the problem. There was probably something wrong with my HTML editor and when I pasted the link in, it must have messed up the code somehow. I just went to the WP admin interface, clicked the HTML editor there, and inserted the link. Everything seems to be working fine now.
Thanks for the reply!
[...] Link Cloaking Plugin for WordPress [...]
if I am doing the selective cloaking where do I put the tag. I tried putting it in the link when I hit the hyperlink chain option in wordpress where you do your post.
That didn’t work. Where do I put it?
I really would like to have “cloak all links” but when I put things in the exception field they are still cloaked. I tried deactivating and reactivating and it didn’t help.
I went to permalinks under settings and there is no button to “update permalinks” it only says “save changes”. Your other post said to go to “options” and then update permalinks. I don’t see any “options” tab. I only see permalinks under settings.
Thanks
Put the tag inside, or after, the link text. This should be done in HTML view. Example:
Keep in mind that the exception list is for domain names, not links in general. That is, “example.com” will work, but “http://example.com/” won’t do anything at all.
The installation instructions are a bit outdated. The “Settings” menu was called “Options” in older versions of WordPress, and the button on the permalink configuration page was called “Update Permalinks” once. I’ll update the readme to reflect the new Dashboard organization.
Lots of links cloaked using this plugin just reload the page rather than take the user to the desired website.
Any ideas why?
See this page: http://carbatterycharger.org.uk/halfords-fully-automatic-car-battery-charger/
I see two cloaked links on that page. When I click any of them, I get redirected to a product listing on http://www.halfords.com. As far as I can tell, this is the expected result.
Tested in IE 8, Opera 10.61 and Chrome 6.0.
Thanks for looking.
If I log out of WordPress then click on the links it works but if I am logged in then it takes me to the domain level.
Cheers!
I guess you might have some sort of plugin conflict then.
thank’s Shadow….
Hi,
Loving the plugin so far thanks! However, clicks don’t seem to be registered by WP Stats since I installed this. Is this expected behaviour as they are now clicks on my domain rather than external links? Is there any way to fix this?
Thanks,
Dave
Yes, that is to be expected.