Is This Drupal?

As an avid Drupal user and developer I often find myself poking around on a website trying to figure out if this particular site was built using Drupal or not. Sometimes it is really easy to tell, the powered by Drupal, common login box, and certain themes are a dead giveaway.

Other times it is not that easy. Especially with more and more talented designers and developers making the transition to Drupal.

I came across this article on Lullabot’s website that points out an interesting fact. Since the release of version 4.6 Drupal sets the HTTP Expires header to Expires: Sun, 19 Nov 1978 05:00:00 GMT, the birthday of the projects found Dries.

Certainly not 100% unique, but pretty unlikely that a non Drupal site is going to set the same header. Match this, and you can be fairly certain you’ve got a positive match.

So the wheels start turning, and a couple hours later I’ve whipped together a very simple website that attempts to detect a Drupal installation at the given URL.

http://isthissitebuiltwithdrupal.com

UPDATE: 2/27/2009

The application now checks for the presence of a file named misc/drupal.js that starts with the line “// $Id drupal.js”. This allows the check to work on sites like the onion which area setting their own Expires headers as part of a caching strategy, but is smart enough to not get false positives on sites like Twitter which return a custom 404 page.

If the above test fails it falls back on the previously discussed HTTP Header test. It should be fairly accurate. Let me know if you come up with any false positives and I’ll see what I can do.

Comments

NERD! The only site I could fine on my bookmark bar was Twitter. Do you Tweet? I still can’t figure out the use of it. . .I probably just need an iphone to make it worth it.

Twitter huh. Well that is a false positive. I’m 99.9% sure that twitter isn’t running Drupal. I suspect it is because the URL http://twitter.com/misc/drupal.js returns a not found page. Which, I suppose is pretty common. I’ll have to make sure and check the contents of the returned page for something Drupal specific.

Thanks for the heads up.

The bogus site i have ever seen its ridiculous..are you thinking to sell adds here then forget..:D any one can know by inspecting the source and by view source.

This website means a great joke :D

@james – You’re right it is pretty easy to just check the source code of a website and tell weather or not it is built with Drupal. It’s even easier to just click a javascript bookmarklet though.

I have no intention of ever placing adds on the site, it really was just a spur of the moment thing that I thought we be fun for the Drupal community to play with.

@james Why so serious?

wonderful. i also have read articles regarding drupal and they all tell something good about it like it’s very easy to use and the most effective. i remember the drake magazine also changed to drupal. give us some updates. thanks.

good post. i’m wondering why drupal is very popular nowadays. i agree with someone here as i have also read articles about drupal and it says that it’s the fastest to use. can anyone explain further?

James, go back and play with lego.

You may also need to check for misc/drupal.css in order to classify sites like http://savannahnow.com/. Currently your check says No but it is listed on “Media sites using Drupal” http://groups.drupal.org/node/5100 and view source shows that misc/drupal.css is being used. Nice app btw. I’m a Drupal fan as well as a Linux fan.

Hmmm, it doesn’t seem to work with a site built with Drupal 4.6 (CiviSpace). email me and I’ll give you the domain name.

Would you dig around http://kleercut.net/en/

and tell me why it doesn’t flag as a Drupal site with
http://isthissitebuiltwithdrupal.com/ ?

When I look at the page URLs and the page sources I get a lot of Drupal vibes.

Thanks