How do I use the Redirect Module for Drupal SEO?

The Redirect Module https://www.drupal.org/project/redirect

The Redirect module creates 301 redirects from old URLs to new URLs on your website. 301 redirects 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 URL that changed and fix them. There are reports in Google Search Console that can help, but it’s better to prevent missing pages from the start. This module highlights the power of Drupal, automating what used to be an arduous and ongoing SEO chore. Thanks to the power of Drupal 8 and the Redirect module, fixing links is a much less frequently needed task.

  1. Install the Redirect module on your server.
  2. Go to the Extend page: Click Manage > Extend (Coffee: “extend”) or visit http://yourDrupal8site.dev/admin/modules.
  3. Select the checkbox next to “Redirect” and click the Install button at the bottom of the page.

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

  1. Click Manage > People > Permissions (Coffee: “perm”) or visit http://yourDrupal8site.dev/admin/people/permissions.
  2. Select the appropriate checkbox for “Administer URL redirections”.
  3. Click the Save permissions button at the bottom of the page.

How do I configure the Drupal Redirect Module for SEO?

  1. Visit the Redirect Admin page: Click Manage > Configuration > Search and metadata > URL redirects > Settings (Coffee: “url redirect” then click the Settings tab) or visit http://yourDrupal8site.dev/admin/config/search/redirect/sett ings.
  2. Make sure your settings match the image above. These are the correct settings for most websites.
    A. Select the appropriate checkbox next to “Automatically create redirects when URL aliases are changed”.
    B. Select the checkbox “Retain query string through redirect”.
    C. Select “301 Moved Permanently” from the “Default redirect status” drop-down.
    D. Select the checkbox “Redirect from paths like index.php and /node to the root directory”.
    E. Select the checkbox “Redirect from non-clean URLs to clean URLs.”
    F. Select the checkbox “Redirect from non-canonical URLs to the canonical URLs”.
    G. Select the checkbox “Normalize aliases”.
    H. Select the checkbox “Taxonomy Term Path Handler”.
  3. If you changed anything, click the Save configuration button at the bottom of the page.

How do I create a manual redirect in Drupal?

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.

  1. Go to the URL Redirects page: Click Manage > Configuration > Search and metadata > URL redirects (Coffee: “redirects”) or visit http://yourDrupal8site.dev/admin/config/search/redirect.
  2. Enter the From and To URLs.
    A. “From” is the old URL that is broken.
    B. “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 http://.
  3. Select “301 Moved Permanently” (or one of the other options as suited to the situation) from the Status code drop-down menu.
  4. Set the “Original language” as appropriate.
  5. Click the Apply button. Now, when someone visits the old URL, they’ll be automatically redirected to the new one.