The Redirect Module

The Drupal redirect module is easy to install and configure

Credits & Thanks

Thank you to:

About the Redirect Module

The Drupal Redirect module redirects visitors from old URLs to new URLs. When you move a piece of content to another section of your site or inadvertently change the URL, this module can really help.
The Redirect module creates 301 redirects which help your SEO by making sure that any URL that ranks in Google will still resolve when a visitor arrives. If you don’t install this module, you will have to regularly look for any URLs that have changed and fix them.

This module highlights the power of Drupal, automating what was once an arduous and ongoing SEO chore. Thanks to the power of Drupal and the Redirect module, fixing links is a much less frequently needed task.

Install and Enable the Redirect Module

  1. Install the Redirect module on your server. (See this section for more instructions on installing modules.)
  2. Go to the Extend page: Click Extend (Coffee: “extend”) or visit
  3. Search for the Redirect module in the search field:

    Drupal redirect module install for drupal 9
  4. Select the checkbox next to “Redirect” and "Redirect 404" and click the Install button at the bottom of the page.


If necessary, give yourself permissions to use the Redirect module.

drupal redirect module permissions for drupal 9
  1. Click People (Coffee: “people”) and click into the Permissions tab. Or go to
  2. Select the appropriate checkboxes under the “Redirect” section.
  3. Click the Save permissions button at the bottom of the page.

Configure the Redirect module

  1. Visit the Redirect Admin page: Click Configuration > Search and metadata > URL redirects > Settings (Coffee: “url redirect” then click the Settings tab) or visit

    drupal redirect module configuration settings drupal 9
  2. The default settings are usually adequate, so make sure your settings match the image above.
    1. Select the appropriate checkbox next to Automatically create redirects when URL aliases are changed.
    2. Select the checkbox for Retain query string through redirect.
    3. Select “301 Moved Permanently” from the Default redirect status drop-down.
    4. Select the checkbox Enforce clean and canonical URLs.
    5. Select “10000” from the 404 error database logs to keep drop-down
  3. If you changed anything, click the Save configuration button at the bottom of the page.

How to create a manual redirect

The Redirect module also allows you to create manual redirects. If you move content, put the wrong URL on some printed advertising, or you’re migrating content, this is an invaluable function to understand.

Note: Creating a manual redirect isn’t necessary right now. However, it’s an essential skill for a growing site, so I’m covering it here.

  1. Go to the URL Redirects page: Click Configuration > Search and metadata > URL redirects (Coffee: “redirects”) or visit
  2. Click the +Add redirect button.

    add a rule redirect in drupal 9
  3. Enter the From and To URLs in their respective fields:
    1. Path is the old URL that is broken.
    2. To is the new URL. If it’s a link on your site, you can use just the path beginning with the /. For example: /your/path/here. If it’s an external URL, put the entire URL including the https://.
  4. Select “301 Moved Permanently” (or one of the other options as suited to the situation) from the Redirect status drop-down menu.
  5. Click the Save button.

Now, when someone visits the old URL, they’ll be automatically redirected to the new one.


Did you like this walkthrough? Please tell your friends about it!

facebook icon twitter social icon linkedin social icon