Out of the box and with common configurations, many Drupal sites lack some search engine optimization basics. Start your project off right by installing and implementing these modules from the get-go. They won’t shoot you to the top of Google’s results, but they will remove key obstacles that might prevent you from getting there.
Path Redirect and Global Redirect
Chances are you’ve already implemented Pathauto to provide intuitive and human friendly URLs to your site. But Pathauto has a dark side. Even when properly configured on its own, Pathauto can make the same content (the same node for instance) available at many different URLs as the content is edited over time and new URL aliases are created. For instance,
These URLs might all display exactly the same page. However, Google sees each URL as a unique page and thus a separate potential search result. Even if the page itself is rich, relevant, and other sites are linking to it, the “Google” juice is spread over every URL where the content is available.
Path Redirect (D6) / Redirect (D7) solves this problem by allowing you to configure Pathauto to redirect old aliases to the new aliases automatically. Further, the Global Redirect module ensures that system urls (node/123) and “unclean” URLS (?q=path/to/page) also redirect to a single URL.
The major search engines (i.e. Google and everyone else) have come up with a simple specification for listing all the URLs on your site. Simply place a specially formatted “sitemap.xml” file at the root of your site and search engines will find it and use it when considering which URLs to crawl. Now, including a URL in your sitemap is no guarantee it will actually get crawled—search engines do prefer to find links on their own. But your sitemap helps the search engines out and can provide extra information like which URLs you deem the most important and how often the content at specific URLs is likely to change.
Obviously, manually maintaining an xml sitemap for a typical Drupal site would be a nightmare. That’s where the XML Sitemap module comes in; it dynamically generates your sitemap file(s) and even pings your preferred search engines when your sitemap is updated. You can configure your sitemap to optionally and automatically include node, taxonomy term and menu item URLs. If you’ve built custom pages with Views’ or Panels’ arguments, you can manually add them with the XML Sitemap Custom sub-module.
Okay, I admit, in this category there is not one essential module, but a number of different options for accomplishing the same thing: controlling the generation of your meta description and page title tags. Both can affect your keyword relevance and both contribute to the display of your search results in Google: page title is typically used as the text of the search result link and meta description is often used as the the search snippet.
For Drupal 7, the clear choice is the Meta Tag module. It allows you to set global default patterns using tokens with the option to override the patterns at cascading levels right down to the individual node, user, term or any other entity. The module has options for description, title and advanced meta data like Dublin Core. The only limitations that are a current lack of integration with Views or Panels and no ability to specify meta data for custom paths.
For D6, the outlook is a little hazier. The Nodewords: Meta Tags for D6 module is the predecessor to Meta Tag in 7 and has a lot of similar functionality. Unfortunately, the latest stable release lacks crucial token support and no ability to override page title. Other options for D6 are Integrated Meta Tags and Context Meta Tags, both of which have token support but fewer options. With any of the D6 options, you may want to supplement them with the Page Title module to exercise tight control over the—you guessed it—page title.
These modules are just the tip of the iceberg when it comes to making your site search engine friendly. In future editions, we’ll discuss themeing do’s and don’ts and how to future-proof your site using the semantic web.
This post was authored by former Isoveran Kelly Lucas.