Create 301 and 302 URL Redirections in Drupal

| Drupal
Create URL Redirections in Drupal 7

Websites change frequently and you often need to move or change URLs. Whenever you make a change, you'll need to safely redirect the old URLs to the new URLs.

In this tutorial, I'm going to show you how to create 301 and 302 redirects for your Drupal site. 

Step #1. Install and enable Redirect module

Download the Redirect module from this page.

drupal redirections

  • Install and enable the module.

Step #2. Create an internal redirect

  • Go to Configuration
  • Look in the Search and metadata section for "URL redirects".

drupal redirections

  • Click "Add redirect".

drupal redirections

Fill in the settings:

  • Enter the old URL into the From field
  • Enter the new URL into the To field
  • Leave the Enabled as checked.

drupal redirections

Optionally, inside "Advanced options", change the redirect status according to your needs.

The most common are:

  • Default (301): for permanent redirects. For SEO purposes, to tell Google to index the new URL.
  • 302 Found: for temporary redirects

drupal redirections

  • Click "Save" when you're done.

Step #4. Create an external redirect

You can also create redirects pointing outside your site.

For example, I want to use the link www.mysite.any/go-out to redirect to www.google.com with the settings below:

drupal redirections

Step #5. Test the redirect

Go to your www.mysite.any/old-url to confirm is indeed redirecting to www.mysite.any/new-url.

Step #6. Number of times a redirect is being used

You can track the number of times a redirect is being used, by checking the statistics in "Count" column from the URL redirects list:

drupal redirections


About the author

Valentín creates beautiful designs from amongst the tequila plants of Jalisco, Mexico. You can see Valentín's design work all over this site and you can often find him helping members in support.