Search Engine Friendly URL's and Drupal - Part 2

In my previous post I showed you how to set the friendly URL for each page/piece of content on your site. Hand curating can be fun, but it's also time consuming and requires a little thought. It can also be a little cumbersome when you have a long title, like the title of this post. In steps the Path Auto module to save the day. In conjunction with the Token module, Path Auto automates the task of creating and setting these URL's. How does it work? It's pretty simple really.

  • Using Drupals internal URL alias functionality, Path Auto automatically(automagically) creates URLs for you when you create a new piece of content.
  • The structure of this URL is determined by you, the user, via the Path Auto administration page (http://www.yoursite.com/admin/settings/pathauto).
  • Each individual content type (via CCK module) can have it's own settings
  • The path can be hard coded to anything you like, or it can use "tokens" to determine how the page is made up, for instance:
  • Once your paths have been setup you can then select the "Bulk generate aliases for nodes that are not aliased" for those paths you have configured. This will create new URLs/aliases for your existing content. Also note that this will generate aliases for all existing nodes which do not already have aliases.
  • In the future, when creating new pieces of content, the URL/alias will be created for you based on the criteria you have chosen in the path auto settings.

So that's it, not that difficult really. There are a few issues I'm come across when using path auto, and my one piece of advice is to decide on your alias structure before you start entering content. Or, if you have entered content and are running a bulk update, Think carefully about your alias structure. If you do mess it up there's an easy way to re-run the alias update. You can do this via Update area of the "Content" management page. Select the content you want to update and choose "Update path alias" from the drop down options.