Drupal's Pathauto Module is a great module for SEO. It automatically generates URL aliases for nodes based on highly-configurable rules.
This tutorial starts by introducing Drupal's URL aliases, and then moves on to configuring Pathauto. I'm writing this tutorial for Pathauto version 5.x-2.1, but the basic concepts should apply to other versions also.
First, download the Pathauto module and the Token Module. Both are needed to make Pathauto work. I also recommend installing the related Global Redirect module for reasons mentioned in my Drupal SEO tutorial.
Drupal URL Terminology
Drupal has internal URLs with structures like node/123, user/5, and taxonomy/term/1. If you build a Drupal site and don't use the Path or Pathauto modules, your URLs will look like example.com/node/123.
Drupal's built-in Path module lets you override those default URLs with URL aliases. A URL alias is just an alternate URL that will load an internal Drupal URL.
For example, if you have a node (page) at http://example.com/node/123, you can manually create a URL alias with the Path Module so that http://example.com/green-cars is used instead of http://example.com/node/123. (Side note: the reason for installing the Global Redirect Module above is to prevent duplicate content by creating redirects to the URL aliases.)
The Pathauto Module is a module that automatically generates URL aliases based on your custom Pathauto settings.
Pathauto Settings
After you install Pathauto, go to the Pathauto settings page at admin –> pathauto.
Your Pathauto settings page may look different, depending on which modules you have installed:

Click on General Settings to open that section. In this basic Pathauto tutorial, you can leave everything at the default setting except for this section:

For Update action, be sure to choose "Do nothing. Leave the old alias intact." That will prevent your URLs from accidentally changing if you change the title of an already published node.
I have some sites with characters in foreign languages so I check the box that says "Transliterate prior to creating alias". That means that if you use non-English characters in your post titles, Pathauto will convert them to their equivalents instead of replacing them with a dash.
You won't be able to check the box until you make a i18n-ascii.txt file, which is as easy as renaming the one that comes in the Pathauto directory (just remove the word "sample" from the existing file's filename). There is a page on Drupal.org with information about customizing your transliteration file if you need something else from it.
I also check the box that says "Reduce strings to letters and numbers from ASCII-96" because search engine crawlers are not very smart and I like to keep things simple for them.
The only setting that you need to change in the Punctuation Settings section is the one for Hyphen. Change it to No action (do not replace) as shown below:

The only reason for that is to remove an error message that will otherwise appear.
Pathauto Rules
Each content type in Drupal can have a different set of Pathauto URL rules. The URL rules can be based on things like taxonomy term ("category"), node ID number, title of the node, date or time based, author name, etc.
Here is a sample list of available tokens that you can use in URLs that you can view by clicking on "Replacement patterns" on the Pathauto configuration page:

You then enter the above-mentioned replacement patterns in your Pathauto rules for each content type:

In the screenshot above I'm creating very "non-Drupal" URL paths. More common would be to leave out the [nid] and the .html file extension.
Pathauto Warnings
There is a page on Drupal.org about dangerous Pathauto patterns. You can avoid all of those potential problems by just making sure that you never use just [title-raw] as the only setting for Pathauto. There should always be more data in the URL than just the title otherwise people could authenticate your site in Google Webmaster Tools or create a URL alias that conflicts with an existing system path.
The thing you don't want is for someone to be able to create a node called "This is my post" and have the resulting URL be example.com/this-is-my-post. You should have a little more data in there.
Examples of extra data that you could add to the Pathauto rules are:
- Node: content/[title-raw] which would result in: example.com/content/this-my-post
- Node: even better would be [term-raw]/[title-raw] because then it would put your content in keyword-themed directories.
- Node: [nid]-[title-raw] which would result in: example.com/123-this-my-post. The node ID number is good in certain situations, like when trying to get your site into Google News, which requires a minimum 3-digit number in the URLs.
- Node: you can even create pages with file extensions like this: [term-raw]/[title-raw]-[nid].html which would look like this: example.com/green-cars/this-my-post-123.html
- Taxonomy term: example.com/tags/green-cars
Further Assistance
Drupal's Pathauto Module can be difficult to configure, but it is one of the modules that makes Drupal a great CMS. It's often a good idea to test your Pathauto rules on a sandbox site before putting them on a live site until you figure out patterns that you like.
If you have questions about configuring Pathauto, please leave a comment below.
Comments
what about actual paths on the server?
what about actual paths on the server you dont want drupal to interpret with path auto ?
Case in point,
I've installed durpal 6.8 on my host and installed the path auto module. It works great ! Now I installed another 3rd party app which was installed in a subdirectory called /videos/
I can access the frontpage but when I click on any links from the videos/ page, drupal seems to interfere and process those links (even if it shouldn't) thereby resulting in a page-not-found error.
But in reality, the page and file is physically present (eg. videos/include/theme.php) but the 3rd party script is being bypassed by drupal's pathauto.
I couldn't find it in the pathauto settings on how not to include this subdirectory (videos/) so it can be accessed out of drupal.
Any help would be greatly appreciated.
physical paths
Did you check your automatically generated URL aliases to see if you accidentally created a URL alias that starts with "video"? You can view a list of URL aliases at example.com/admin/build/path.
physical paths
yeah, i checked the admin/build/path and "video" is nowhere defined in pathauto. is there any other section within admin where it may be overruled or defined ? I'm stumped.
Drupal URL alias paths
The only things I can think of at the moment:
If you post the URL here, I could take a look. List the installed modules too.
Correct URLs on the page
So I have successfully installed all the modules you mentioned above and generated aliases for all my pages. When I am on the actual page they are correct, but if you hover over any link on the page it still shows the orgional, raw link (eg. node/10 instead of content/solutions). Is there anything I need to do to generate an aliases link on the page?
Thanks.
Pathauto
It's difficult to troubleshoot without seeing the actual site.
What are all the modules you have installed & enabled?
Have you modified core code?
Have you modified the theme?
Requires mod_rewrite or not?
Hi, I'm so glad I found your _awesome_ article. I have a question, fairly new to Drupal but otherwise well-versed in Web technology and webmastering.
In Drupal does pathauto depend on Apacxhe's mod_rewrite or is the feature entirely native inside the Drupal application/framework?
Thanks! BL
Drupal mod_rewrite
Drupal uses mod_rewrite under Apache, but you can get clean URLs on IIS too:
http://drupal.org/node/3854