Creating a redirect

Often when a new website is launched and is replacing a previous version of that site, one or more URLs (web addresses) will be different on the new site. When building out a new site, we take efforts to match old URLs to the new, but this is not always possible. For example, on the old website, a page may may have been located at sitename.duke.edu/about-us, but on the new website the same page is now found at sitename.duke.edu/about.

In some cases, for example highly-visible pages or pages that are visited very often, it makes sense to set up a redirect so that users who have bookmarked an old URL or come across an old URL via a search are automatically taken to the new URL on your Drupal site. Here are the steps to do so:

  1. Select Configuration > Search and metadata > URL redirects from the administration toolbar. This will show you the list of redirects already in place. You can edit or delete any of the existing redirects.
  2. Click + Add redirect to add a new redirect: enter the old alias (e.g. about.html) in the Path field, and the new alias (e.g. /about-us) in the To field.
  3. In almost all cases, the Redirect status should be left as the default 301 Moved Permanently.
  4. Click Save.

Alternatively, you can add a URL redirect to an existing page from a node’s edit form:

  1. Go to the node to which you would like to create and point a redirect.
  2. Click the Edit tab.
  3. In the right-hand column of the edit form, expand the URL Redirects tab:
    the URL redirect section of the editing sidebar.
  4. Click Add URL redirect.
  5. The Add URL Redirect form will open in a new tab.
  6. Add the Path that you would like to have pointing to the page in question.
  7. Leave Redirect Status as the default 301 Moved Permanently.
  8. Click Save.

If you do not have this option when logged in, please contact trinitywebsupport@duke.edu.

If you have a large number of redirects that you need to create, you can also collect all the redirects you wish to add in a spreadsheet that includes all the old aliases in the first column, and all of the new, respective, aliases in the second column. Send this spreadsheet along with the site/department name to trinitywebsupport@duke.edu and our team can perform a bulk import of the redirects for you.