Redirects

Redirects are used to send users who are going to outdated URLs to a new, more appropriate URL. In GW Drupal, redirects can be set up using the URL redirects tab on individual content entry pages or you can manage multiple redirects using the URL redirects list.

For instance, if a website no longer exists at a specific web address, users can be automatically redirected to the new web address.

Creating Redirects on Individual Pages

This method will create a redirect from the desired redirect URL to the page you are editing. 

  1. At the bottom of the New Draft content entry page, click on the tab for URL redirects.
  2. Click on the + Add URL redirect to this node text link to create a new redirect
  3. Type or paste in the end portion of the old page link (i.e. what comes after .gwu.edu/) into the From field
  4. The To field will be prepopulated with the Node ID of your page
  5. Make sure the Enabled checkbox is checked
  6. Click the Save button

Creating Redirects from the Drupal Admin

This screen allows you to manage all redirects configured on your site and see a count of how many times each redirect URL has been visited.

  1. Hover over Configuration > Search and Metadata
  2. Click on URL Redirects
  3. Click the + Add Redirect text link
  4. In the From field, type or paste in the end portion of the old page link (i.e. what comes after .gwu.edu/)
  5. In the To field, type or paste in the destination link
    1. this can be the Node ID for a page on your website
    2. the full URL for a page on your website or a completely different website
    3. use /front to redirect to your GW Drupal homepage
  6. Make sure the Enabled checkbox is checked
  7. Click the Save button

Repeat these steps for any additional redirects needed.

Redirecting Document Links

Redirects can also be created if a document link changes. 

Note: If there are special characters in the document filename such as spaces or parentheses, they will appear in your web browser as "%20" or similar. For example, a file named "My File (1).pdf" will appear in your web browser as "My%20File%20%281%29.pdf". 

If the URL you wish to redirect (or redirect to) includes these codes, use the original filename when creating the redirect, for example: https://example.gwu.edu/My File (1).pdf

In general, we recommend avoiding filenames with spaces and special characters other than dash (-) or underscore (_).