How To: Stop DiggBar From Stealing Your Content

Update: Good news, everyone! DiggBar is now dead.

Digg released DiggBar last week, and it’s an odd and unwanted bit of code… What DiggBar does is much like a URL shortener, like TinyURL, and it allows you to look at digg comments on sites and digg or bury content from a little toolbar at the top of the site – and this is all well and good, but what DiggBar is also doing, is stealing your traffic – and for this it can die.

Let me explain: In a normal TinyURL link, TinyURL sets the page forward from its smaller URL as a 301 Permanent Redirect, this means that in search weightings, the 301’d page gets counted as the page source, while the TinyURL link was just a way of getting to that page. Any occurrence of the TinyURL URL that points to a site, gets counted as the site URL, not a TinyURL URL – with me? With DiggBar, digg grabs your content and puts it in a frame with some buttons for digg/bury etc and hides the original content URL as a digg one – to show this, just view the DiggBar version of a site by prefixing digg onto something by going: i.e.

However, you’ll notice that if you try it with, I kill the DiggBar frame – and here’s how you do it:

Somewhere on you site, such as in a header inside the <head> </head> tags (so that it’s loaded on each page), put the following javascript code:

  1. <script type="text/javascript">
  2. <!--
  3. window.onload = function() {
  4. if (top.location != location) {
  5. top.location.href = document.location.href ;
  6. }
  7. }
  8. // -->
  9. </script>

Job done, no more DiggBar ripping off your site hits.

Further reading can be found here:

Update: Digg has relented and will be making changes to the effect of: i.) All anonymous users, those not logged into, will now be taken directly to the publishers content via a permanent redirect – no toolbar, no frames., and ii.) Registered Digg users that have not opted out will continue to see the DiggBar, but they will only see the bar when logged in, and opting out will be made much easier.. And not a moment too soon…

Update 2: Updated above iFrame killing code on 1st Oct 2009 – works again to kill Diggbar. Grrr. Bad Diggbar. Stay dead.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.