When urls change but you don't want the old url to break, a redirect can be used to maintain access from old urls.

Creating & managing redirects

Site Coordinators and Site Builders can create and manage redirects within Drupal.

Step 1

In the administration menu, go to Configuration > Search and metadata > URL redirects

Step 2

Click 'Add redirect' to create a new redirect.

Step 3

Enter the url path you are redirecting from, and the new path you are redirecting to. The redirect To location can be an external website or file.

In most cases the Redirect status (under Advanced options) should be the default 301 option.


Managing redirects

The URL redirects page lists all redirects on the site. The page shows how many times each redirect has been used (count), and when it was last accessed.

Redirects with a very high count can be indicative of a problem; such as a redirect loop.

Redirect loops

Pages can get into an endless redirect loop if it is configured to redirect to itself. This can happen when a page url is changed and then changed back again to its original url.

The page url is generated in part from the page title, so when the page title changes, the url will likely change as well. Drupal automatically creates a redirect from the old url path to the new path. When a page url changes back to its original path, the redirect is not automatically removed and this can cause an endless redirect loop.

How to fix

  • Edit the page that is endlessly redirecting.
  • At the bottom in the Redirects tab, look for the redirect which has a high count number.
  • Delete the offending redirect.