In this video, we'll take a look at all of our active URL redirects, we'll see how to create "Short URLs", and we'll watch as a URL alias is automatically updated when we change an article's title.

Viewing active URL redirects

The "List" tab lists all active URL redirects.

  • Go to "Configuration => Search and metadata => URL redirects" (admin/config/search/redirect"

Here you can see that I have two redirects. You'll see that "users/1/edit" is redirecting to "user/1/edit", but if I click "users/1/edit" in the "From" column, you'll see that we're redirected to "users/brian/edit", which (thanks to Pathauto and Sub-pathauto) is the more readable, user-friendly alias of "user/1/edit".

Back on the URL redirects page, you can also click "Add redirect" to manually create a redirect. One reason you might use this is to create multiple, or "short" URLs that link to specific content on your site.

For example, on ModulesUnraveled.com, I create a URL alias for each podcast episode. This way, I can tell Pathauto to create URL aliases that include the podcast title (so that visitors and search engines know what to expect on each page), but I can say "short URLs" on the show. So, on the show, I simply say "go to modulesunraveled.com/podcast/048" and when users type that in, they are redirected to "modulesunraveled.com/podcast/048-mortendk-and-pedro-cambra... etc"

Handy.

Auto-generated URL aliases when you change the title

Let's say I wanted to give "Article 1" a more descriptive title, or maybe just fix a typo. We can simply edit the article, make the change to the title, and click save.

Now, if we head back to our Redirects page, you'll see a new entry redirecting from our old URL to "node/1". The redirect module does this automatically because we checked the box next to "Automatically create redirects when URL aliases are changed" in the Settings tab. This way, if someone had bookmarked the article, or another site is linking to it, visitors will be redirected to the new URL, and search engines will know that it is the same content, so you'll keep any SEO juice the page has built up, and you won't be penalized for having duplicate content.