Drupal and URL aliases

Question:
How to set-up URL aliases on Drupal?

The basic form of URLs on Drupal are as follows:

  http://www.villa-la-herradura.com/?q=node/157

These are known as 'dirty' or 'unclean' URLs and are not good practice for search engine optimisation.

So the first transformation is to go about getting 'clean' URLs. This is easily obtained by selecting 'Clean URLs' under Site Configuration. And then selecting 'Enabled' for clean URLs. Note, your server will need to support this feature.

So now the previous dirty URL will now be as follows:

  http://www.villa-la-herradura.com/node/157

The next step is to replace the 'node/157' with something more meaningful - such as 'the-pool'. This calls for the 'Path' module which is part of the Drupal Core - optional modules. Via Site Building -> Modules enable this module.

So now when we go to edit the page node/157 a new field set of 'URL path settings' is available. Within this is a text field where you can enter the preferred URL alias. For example, by entering 'the-pool' the improved URL is now as follows:

  http://www.villa-la-herradura.com/the-pool

But there is still more we can do to make things easier and more effective.

Next, install the pathauto module. After installation enable it - at this stage you will also be notified that the Token module is required. Click continue and Drupal will enable this for you.

Taxonomy: