Drupal - How to tell if a site is using Drupal 7

Some obvious giveaways to the site being drupal 7:

  • RDF in the <head> section in the HTML
  • Meta tag of <meta name="Generator" content="Drupal 7 (http://drupal.org)" />
  • Executing jQuery.fn.jquery; reveals the jQuery version to be 1.4.4 or 1.5.2 (with jQuery update)
  • Only a single <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - this is a famous drupal 6 bug (it has two in the <head> section
  • HTTP response header of X-Generator: Drupal 7 (http://drupal.org)

Other options include using 'sniffers', my favourite being 'Whatweb' - https://github.com/urbanadventurer/WhatWeb. Whatweb is a (ruby) command line tool that can sniff not only the fact that the site is using drupal, but often the major and minor version as well


Unless someone has taken it out, you could look for the tag below

<meta name="generator" content="Drupal 7 (http://drupal.org)" />

Syntactically though, I just too a look for a way to be sure and can't really see anything. Jquery now requires being wrapped

(function ($) {

})(jQuery);

but some older Drupal sites may also do things that way if they had been customised.

I think the answer is that you can't be 100% sure.


One quick way is to try hitting the http://example.com/CHANGELOG.txt URL, to see what the changelog reports as the version being used. For example, this happens to be true for Drupal.org: http://drupal.org/CHANGELOG.txt.

Tags:

7