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:
- 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.
- 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.
- In almost all cases, the Redirect status should be left as the default 301 Moved Permanently.
- Click Save.
Alternatively, you can add a URL redirect to an existing page from a node’s edit form:
- Go to the node to which you would like to create and point a redirect.
- Click the Edit tab.
- In the right-hand column of the edit form, expand the URL Redirects tab.
- Click Add URL redirect.
- The Add URL Redirect form will open in a new tab.
- Add the Path that you would like to have pointing to the page in question.
- Leave Redirect Status as the default 301 Moved Permanently.
- Click Save.
If you do not have this option when logged in, please contact email@example.com.
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 firstname.lastname@example.org and our team can perform a bulk import of the redirects for you.