Drupal SEO in under 5 minutes
Feb 12th, 2008 by Brian Chappell
Drupal in my opinion is the most search engine friendly, out of the box, solution in existence today. However, with that said, there are still some things that need to be done to any installation to ensure search engine success, and save you from issues down the road.
Note: Keep in mind many of the tactics listed below are things that should be done from the get go. If you plan on implementing these tactics with a site that is already fully built, indexed and aged, then you are going to want to take different steps to ensure SERP disaster doesn’t ensue.
- First thing is first, turn on clean URLs (which is the same thing as entering /%postname%/ in the permalink structure section in Wordpress) Navigate to Home > Administration > Site Configuration > Clean URL’s. You need to make sure your server accepts mod_rewrite or this is not going to work.
- Go download the Drupal page title module. It is going to take some tinkering to get this to work, but in the end gives you the flexibility of having different page titles than your headings.
To make this work you need to make sure your theme has a template.php If it doesn’t then you will need to create one (the page title module has an example one you can use). These lines need to be added to the ‘page’ hook of the _phptemplate_variables function.
if (module_exists(’page_title’)) {
$vars[’head_title’] = page_title_page_get_title();
}
- Next, go download the global redirect module. This will take care of the duplicate content issues that arise from having a directory and a page with the same exact content. Eg., www.example.com/duplicate & www.example.com/duplicate/ This module will automatically redirect the “/” version of the page to the non “/” version, thus creating one version. You can also do this on your own by modifying your .htaccess file, but this is an easier solution.
- You will also want to alleviate any canonicalization issues that your site might see from backlinks that point to non www versions or www versions. Use the following code in your .htaccess file to ensure this is taken care of.
RewriteCond %{HTTP_HOST} ^site\.com$ [NC]
RewriteRule ^(.*)$ http://www.site.com/$1 [R=301,L]
- Drupal also creates duplicate content, similar to the directory issue noted above, in the /node/ section of your site. This is a very simple fix as well. Go into your robots.txt folder and block this section of your site with the following code:
Disallow: /node$
- Make sure you also download the Drupal Meta Tag module, this allows you to insert meta tags and description tags for each page/article you post on the site.
What other modules do you use to make your Drupal site SEO friendly?


Very cool, passing it around the office as we speak.
Cool man, will definitely give it a bash, am quite a ‘joomla boy’ but am gonna play with Drupal today, so am glad I read this.
I use the pathauto module for automatically creating URL aliases. It allows you to create patterns for URLs based on node types, users, dates, etc. and offers filtering out selected words.
This shoulda gone hot on Sphinn! Malakas…
Thanks guys glad it was of some use!
@ Yaph
I like to simply go in there and manually set the page name since Drupal gives you that option. I didn’t realize that module utilized patterns though, pretty cool.
@ Gab
Yea Drupal doesn’t serve the mass populous like Wordpress does. If it was a Wordpress SEO post it probably would have
[…] Brian has a good SEO for Drupal tutorial up. I’ve got a project I’m thinking about starting that will need something […]
Yay Drupal!
What do you think of the Google Sitemaps module? Beneficial or no for SEO?
http://drupal.org/project/gsitemap
I also like to throw in Analytics so you can see the results of your SEO
http://drupal.org/project/google_analytics
And nodewords to write meta descriptions for a bit more control over your SERP listing and hopefully better click through, even if you’re not #1
http://drupal.org/project/nodewords
I think the gsitemap plugin is now called the XML plugin, which is the one I mentioned above.
Never used the g analytics plugin, will have to check that out.
Nodewords is pretty much the same as the Meta Tag module.
[…] to additionally install the Page Title, Global Redirect, and Meta Tags modules. In his accompanying blog post are also some notes on the .htaccess and robots.txt […]
Thanks for the article! I became a little curious when you mentioned in the beginning that “If you plan on implementing these tactics with a site that is already fully built, indexed and aged, then you are going to want to take different steps to ensure SERP disaster doesn’t ensue.”
What should I do if I’ve had my site running for some time already? And what’s a SERP disaster?
Thanks!