How to Stop the Diggbar (or Anything Else) from Owning Your Site

by Scott Allen - April 13, 2009 
Filed Under JavaScript, SEM, SEO, Social Media Marketing, Web Design / Development

the new diggbar: How to Stop the Diggbar (or Anything Else) from Owning Your Site web design social media marketing seo sem javascript Recently Digg has overstepped its bounds by framing the content of websites it links to with its new “Diggbar”. Internet marketing savvy site owners are, shall we say, less than happy about this. It’s tough to tell if they are being obnoxiously greedy or are just plain ignorant of internet etiquette. Not to be quick to judge, but I have a hard time believing they are that ignorant.

Needless to say, this is not a good development for website owners and content producers. The new Digg setup obscures the URL of the actual content, with a URL like: and if people link to the Digg URL’s instead of the actual URL of your website’s content, it can potentially create SEO problems, and prevent your site from getting all the inbound links and traffic it’s due.

The Fix

Luckily it’s not difficult to keep your site from being owned by Digg.

If you have a WordPress blog, all you have to do is install a frame breaker plugin like ScrapeBreaker. Just install it and activate.

If you’re not on WordPress, you can manually install a frame-breaking JavaScript in between the <head> and </head> tags of your website’s template. (This needs to be installed on each page of your site.)

<script type="text/javascript">
if (top.location!=self.location) { top.location=self.location.href }

That’s it! You’re done.

Now you can easily keep Digg from taking credit for your website’s content.

Why use this solution over one of the Digg-specific scripts?

There are several other plugins/solutions out there that specifically target the Diggbar, but I don’t advocate using any of these, because I don’t feel that they are a universal enough solution. Each of those use PHP to detect which site is trying to frame yours. I don’t believe there is any practical value in this, and it actually makes the scripts less useful.

This problem with Digg will eventually go away and there will be some new annoyance, rendering these Digg-specific scripts useless. Besides, there are other sites currently out there that may try to frame your site content (such as Facebook), and there is no valid reason to let them do it, so I believe the universal frame breaker is the best solution. I’ve had these installed for years on most of the sites I’ve built or directed, and there is absolutely no downside because they typically are extremely lightweight, only requiring a couple lines of JavaScript code.

More Info About The Diggbar and Its Effects:


2 Responses to “How to Stop the Diggbar (or Anything Else) from Owning Your Site”

  1. Frank J on June 1st, 2009 1:32 pm

    Excellent article and one I have implemented a long time ago. I think Digg missed the boat on this. I would rather my page URL be displayed than the DiggBar with Digg URL.

  2. Scott Allen on June 2nd, 2009 12:46 pm

    @Frank: Thanks! Yeah, we’ve been implementing this for a long time too. I haven’t seen lot of site-framing like this for a long time until these recent issues.

    I agree…It’s much better to have the URL of our own sites be displayed so the authors of the content actually get credit for it.

Leave a Reply
If you have any questions about commenting, please see our Comment Policy.