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
- 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.
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 :
Hey White Shadow,
Thanks, I finally figured that out. I also had another small problem I figured out. I use a add on domain and it would chunk out when viewing http://domain.com/subdomain/prefix/Linktext/12/4.
I have my ad on domain in general settings to go straight to my addon as a real domain. So every time I use selective cloaking, it would spit out the whole link when viewing it such as http://www.domain.com/addon.com/prefix/12/4.
I have to remove the first part every time and it works.
Thanks
Mike
I tried all of the “fixes” in WP 3.0… did the htaccess code, saved permalinks, etc etc… still not working in WP 3.0 and yes, I have version 1.8 installed.
Now what???
not working, im getting 404 error. I even updated permalinks, .htaccess & plugin settings, but still getting 404.
im using wordpress 3.0..
whats wrong?
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!
🙂 Donna
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.