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. In the Sidebar settings panel, click on the dropdown for URL Redirects
  2. Click the Add URL Redirect button 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. Select the appropriate option from the Redirect Status dropdown
  6. Click the Save button

Creating Redirects from the Drupal Admin

This screen allows you to manage all redirects configured on your site.

  1. Hover over Configuration > Search and Metadata
  2. Click on URL Redirects
  3. Click the +Add Redirect button
  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 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. 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 (_). 

Redirecting Archived or Unpublished Pages

When redirecting a page that has been archived or unpublished, use the page's Node ID in the Path field rather than the end part of the URL. Doing this will avoid a 404 Page Not Found page being displayed instead of the intended destination. 

Note: The Node ID for a page can be found by hovering over the Edit tab and looking in the bottom left corner of your browser. If this doesn't work on your browser, it can also be found by clicking Edit and copying the Node ID from the URL.

Image
Screenshot of the Node ID in the URL