Drupal URL Redirects

URL redirects are used when content on your web site is moved from one location to another. If the original URL has been published for a while then visitors and search engines may have bookmarked the page and continue to try to access it at the original URL even though the page has moved to a new URL. This causes a 404 Page Not Found error which is detrimental to site visitor experience and search engine ranking. When a web site redesign is performed the old URLs will probably not match the new URLs. It is very important to map the old URLs to the new URLs, if the content has predominantly remained the same, to maintain search engine ranking.

Creating a URL redirect

  1. Login to the site using an administrative account
  2. Navigate to Site Building > URL Redirects > Add Redirect
  3. In the From field type in the relative path of the old link. If our original link is http://www.codamoda.com/this-page-is-not-here then we would only type in this-page-is-not-here.
  4. The To field is a little more complicated. Drupal uses System paths such as http://www.codamoda.com/node/126 and can also use Friendly paths such as http://www.codamoda.com/the-new-page. It is always best to use the System path. To find the System path:
    1. Open the new URL in a new browser window.
    2. If you see an Edit button click on it
    3. The current URL should now look like http://www.codamoda.com/node/126/edit.
    4. We remove the domain name http://www.codamoda.com/ and /edit from the URL to get the system path. In this case it would be node/126.
    5. So we type in node/126 into the To field.
    6. If you do not see an Edit button then we use the relative path. For example if our URL is http://www.codamoda.com/the-new-page then we remove the domain name http://www.codamoda.com/ and we are left with the-new-page so we enter that into the To field.
  5. By default the Advanced options sets the redirect type to 301 Moved Permanently which is appropriate for most cases. Do not change this.
  6. Click the Save button
  7. We can now test the redirect by opening the old URL
    > http://www.codamoda.com/this-page-is-not-here.
    It should automatically change to
    > http://www.codamoda.com/the-new-page.

Add your comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  .dH588b.   89@SS@@SHH   d9HH     d9HH    S8S@HSH9H  
dSMP Y8Hb d59P dS5EM dS5EM M@9
5S9 5HM dESP 9SE 9SE @@5
Y8Mb. d95M d8EP 8M9 8M9 MES9MH@b.
"YH9EP@E8 HSEM8ESH 5E8 5E8 "Y99b
MES d5@P SSM SSM 8MS
Y@Sb d9HP d5SP 5HS 5HS YMMb dM@P
"Y@E@HP" dH9P 5H5@M89 5H5@M89 "YE8HSP"