Drupal SEO in under 5 minutes

stopwatchDrupal 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?