In this video, we'll take a look at how to configure the Redirect module to automatically take care of our "duplicate content" issue.

We've just discovered that because we have URL aliases setup, our site may be penalized by search engines for having "Duplicate Content" even though we don't actually have any. By installing the Redirect module we can have this automatically taken care of for us. You can find the Redirect module at drupal.org/project/redirect.

Install

Enable

  • Redirect

Configure

  • Go to "Configuration => Search and metadata => URL redirects => Settings" (admin/config/search/redirect/settings)
    • Automatically create redirects when URL aliases are changed: This will automatically create a redirect when you manually change a URL alias, or when a URL alias is created for content that previously did not have an alias.
    • Retain query string through redirect: If there are any query strings present in the source path, checking this box will keep them in the redirected path as well.
    • Default redirect status: The most common redirect status is "301 Moved Permanently". If you have a use-case for a 300, 302, 303, 304, 305 or 307 redirect, you have those as options as well. (If you're not sure what those are, you can follow the link in the description to find out more about redirects.) A "301 redirect" is what we want though. It will tell search engines that one URL alias has permanently moved to another, and that they are in fact the same content. This will prevent the duplicate content penalty I told you about earlier.
    • Allow redirects to be saved into the page cache: This will cache the redirects and requires "Cache pages for anonymous users" to be enabled.
    • Delete redirects that have not been accessed for: You can optionally delete redirects that have not been accessed for a specified amount of time.