Jasper's Home logo

SEO for your Drupal 7 website

In this blog I want to share with you what I have found on my search to improve SEO for a Drupal 7 website. This is basically a summary of everything I found in a LOT of different articles scattered around the internet. I will not even try to compile a list of all the different articles I found to be helpfull but I have tried to put in as many links as I can to point you to other usefull information.

This page is work in progress: Everytime I've learned something new about SEO I'll update this page.

In a nutshell I found that the following are the most important topics to address in creating a SEO friendly Drupal 7 website:

  • make your website responsive
  • incorporate social media in your website
  • reduce response and load time of your webiste
  • make sure the content of your website adheres to a set of guidelines

I'll address the first and second topic seperately below and then cover the Drupal 7 modules you can install that will help to improve SEO friendliness of your website, the guidlines to adhere to when creating content and finally some tips and tricks.

Make your site responsive

Responsive websites rank higher. There are many ways to achieve this. Nowadays Bootstrap is an excellent and very popular framework. I used Bootstrap in my theme to make my website responsive.

Incorporate social media in your site

Plenty of information to find on this topic. Suffice it to say that by using Twitter, Facebook, Google+, etc and incorporating these in your website has a very positive effect on your website traffic.

Drupal 7 modules 

Avanced CSS/JS Aggregation module

This module aggregates and compresses all used JS and CSS files. I found this module to be extremely efficient. Install the Drupal 7 Advanced CSS/JS Aggregation module, activate it and then go to Configuration -> Performance and:

  • Enable page caching
  • Aggregate and compress CSS files
  • Aggregate JavaScript files

Metatag module

Install the Drupal 7 Metatag module, activate it and configure it as follows:

  • give a Description for your Front page and each Node pages
  • click the following checkboxes under advanced: Allow search engines to index this page (assumed), Allow search engines to follow links on this page (assumed).

Global Redirect

Install the Drupal 7 Global Redirect module and activate it (no additional configuration needed)

XML Sitemap

Install the Drupal 7 XML Sitemap module, activate it (at least the core module and the Nodel module) and cofigure it as follows:

  • make sure the Front Page is added
  • configure which nodes of which content types are added to the Sitemap

Make sure the Sitemap is generated and check if all necessary links are present in the sitemap (by clicking on the sitemap)

Guidelines for content

Fix all HTML errors

I use the W3C Validator to check if my site contains any HTML errors.

Optimize all your images

Make sure alle your images are optimized. This means that all images:

  • use the alt text attribute
  • have the correct size
  • have a meaningfull file name
  • have a meaningfull caption (which, I confess, I'm not doing on this site)

Read all about this on this page.

Use meaningful first and second level headings

Every page must at least have a meaningful first level heading (H1) and prefebly a second level heading (H2) that is also meaningful. 

Don't use inline style elements

Make sure the HTML of the PHP templates of your Drupal 7 theme as well as the HTML of your content does not contain any inline style elements.

Tips and tricks

Google Analytics

Create a Google Analytics account and register your website. Add the required js code to your Drupal 7 theme.

Google Webmaster Tools

Create a Google Webmaster Tools account and register your website (which is easy after you have registered your website in Google Analytics). Add your Sitemap in Crawl -> Sitemaps.

Fix URL canonicalization issue

Your out-of-the-box Drupal website usually has a canonicalization issue: www.yourwebsite.com is ussually the same as yourwebsite.com. If this is the case than the same page on your website will be indexed twice. To avoid this issue you have to edit the .htacces file in your Drupal root. See this page for more information and how to fix your .htaccess file.

Server respons time

The longer it takes to load your site, the lower your ranking is. There is much you can do to lower the response time of your website (caching, optimize your images, use a CDN, etc) but even then the response time of your site can still suck! Make sure you select a hosting provider that provides optimization for Drupal websites. There is plenty to find on this topic. The amount of memory and CPU power/time available to your website has a significant impact on the response time of your website. Several hosting providers offer Litespeed web hosting which should be much faster than Apache.

Test test test

There are plenty of websites that offer a free SEO check (and give your website a score). These checks ussually incorporate at least the things I've mentioned above (and in most cases, much more). I use the following sites regularly to score my Drupal 7 websites:


Jasper de Jong
The Netherlands

mail icon  info<at>jaspershome.org

linkedin icon  my linkedin profile

creation    and    design    by    jasper's home