How do I create redirects with Drupal's Redirect module?

The Citead team, updated

In short. Create a redirect under URL redirects, enter the old path without a leading slash, set the To destination, select the Redirect status, and save.

Definition: A redirect sends a request for a source address to a destination address. Drupal's Redirect module creates these mappings through an administration form with a source Path, a To destination, and a Redirect status setting.

Key facts

As of 17 October 2026, the following instructions use the module's release 8.x-1.13 documentation and form definitions.

  • Drupal's Redirect README places configuration under Administration > Configuration > Search and Metadata > URL redirects.
  • The module's redirect form validation rejects source paths beginning with / and source paths containing anchor fragments such as #anchor.
  • The shipped default configuration sets the redirect status to 301.

Where is a redirect created, and what goes in each field?

With Redirect installed, the module's README instructions begin by enabling it under Administration > Extend. In URL redirects, selecting Add redirect opens the creation form. The module's route definitions provide these administration paths:

/admin/config/search/redirect
/admin/config/search/redirect/add
/admin/config/search/redirect/settings

Path holds the old path relative to the site root, without the domain or a leading slash. The source field implementation displays the site's scheme and host followed by / before the input. It also parses query parameters entered after ? into separate source query data.

To holds the destination. The README documents typing a content title to select existing content, entering an internal path such as /node/add, or entering an external URL such as http://example.com. Entering <front> selects the site's front page. These are destination formats; the source field has its own slash restriction.

Selecting Redirect status and saving completes the mapping. The form implementation displays “The redirect has been saved.” and returns to the redirect list.

Which redirect status should be selected?

A status code describes the HTTP response sent for the old address. RFC 9110, HTTP Semantics, defines 301 Moved Permanently for a resource assigned a new permanent address and 302 Found for a resource temporarily available at another address. A permanent move therefore calls for 301; a temporary diversion calls for 302.

The Redirect form code selects an existing redirect's stored status when present and otherwise uses the configured default. The settings form exposes that site setting as Default redirect status. Checking the individual redirect's selector before saving makes the intended response explicit.

What should be checked after saving?

A practical check starts by requesting the old address and inspecting its response status and destination. RFC 9110's redirection definitions specify the Location response header for the destination of 301 and 302 responses. The expected result combines the chosen status with the intended destination.

Query parameters deserve a separate check when the old links contain them. The settings form provides Retain query string through redirect. Its example sends source-path?a=alligators&b=bananas to node?a=apples&b=bananas when the configured destination is node?a=apples: destination values take precedence for a shared parameter.

FAQ

Can I redirect to another website?

Yes. The Redirect README accepts an external URL in To, with http://example.com as its example.

Why does my source path fail validation?

Check whether you entered a leading /, an anchor fragment, or <front>. The form validation rejects each of these source inputs and also checks for a redirect back to the same page.

Can I create redirects automatically when aliases change?

Yes. In the settings form, you can enable Automatically create redirects when URL aliases are changed. The setting is disabled when Drupal's Path module is missing.

Sources

  1. Drupal Redirect project, “README.txt”, release 8.x-1.13, undated
  2. Drupal Redirect project, “RedirectForm.php”, release 8.x-1.13, undated
  3. Drupal Redirect project, “redirect.settings.yml”, release 8.x-1.13, undated
  4. Drupal Redirect project, “redirect.routing.yml”, release 8.x-1.13, undated
  5. Drupal Redirect project, “RedirectSourceWidget.php”, release 8.x-1.13, undated
  6. Drupal Redirect project, “RedirectSettingsForm.php”, release 8.x-1.13, undated
  7. IETF, “RFC 9110: HTTP Semantics”, June 2022

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark