A URL redirect forwards a user to a different URL than the one they were trying to access. This is important for new websites because some of the URLs on old websites may change on the new website.

When to Use Redirects

  • New websites: A URL redirect will point users to the new URL if they happen to try and access the old URL. For example, a URL on an old website such as, http://www.duke.edu/about-us/contact, may change to http://www.duke.edu/contact on the new website.
  • Shorter URLs: Let's say you want to advertise or market a page on your site, but the URL on your site is really long. You can come up with a short URL for your marketing material that will be easy for users to remember and then create a URL redirect to the correct page.
  • Incorrect URLs: If an incorrect URL was sent to your users, for example in a marketing campaign, then you can create a URL redirect to point to the correct URL. In case anyone tries to use the incorrect URL, they will be forwarded to the correct URL.

View Existing Redirects

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

Redirects to avoid

Do not redirect any of the List Page URLs (e.g., /news or /events). Redirecting traffic to these system-generated pages may cause errors on your site.

Create a Redirect

while editing a piece of content

After you create and save any type of content on your site, there will be a URL redirects option available.

(* = required field)

1. Find the content item you want to add a redirect to.

2. Open the URL redirects expand/collapse section and click Add URL redirect.

Image
Screenshot of URL Redirects panel with Add URL redirect button.

3. A new browser window will open. Enter the following information.

  • Redirect status: The status should most often be 301 Moved Permanently. For information about what each redirect status means, visit https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection.
  • Path*: Enter the old URL path that you want to be redirected. Only enter the part of the URL after the ".edu/" – for example, "your-page" instead of "https://yoursite.duke.edu/your-page."
    • URL paths are not case sensitive – e.g., "About" and "about" will work the same
  • To*: Leave this as is because it is the path of the content item that you want users to get redirected to from the old URL you entered into the Path field.
  • Be sure to Save your redirect.
Image
Screen shot of Add URL redirect fields of Redirect status, its current Path and the To field to enter in which page the redirect will go to.

 

from the "aDD url redirect" screen

  • There are two ways to reach this screen:
    1. In the content administration menu, visit Configuration > Search and metadata > URL redirects. Click the Add redirect button.
    2. Visit Configuration > Search and metadata > URL redirects > Add redirect (at URL path /admin/config/search/redirect/add).
  • Fill out the fields as follows:
    1. Redirect status: The status should most often be 301 Moved Permanently.
    2. Path*: Enter the old URL path that you want to be redirected. Only enter the part of the URL after the ".edu/" – for example, "undergraduate-program" instead of "https://sanford.duke.edu/undergraduate-program."
    3. To*: Use this field to search for and select the content you would like users redirected to. When you click the desired content's title, this field will auto-populate with a URL path like "/node/123." Do not edit this path.
      • If you are redirecting users to an external URL (i.e., a page on a completely different website), do not use the auto-select feature and instead type the full external URL (e.g., https://duke.edu).
    4. Be sure to Save your redirect.
Image
Screenshot of webpage for adding a new URL redirect

Complex Redirects

If more complex redirects are desired, please contact the Sites@Duke Pro team.