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.
  .d9M@Mb.    d5SE        dSHE9    .d9M88b.       dSHE9  
dEMP Y8Eb dM8M9 dEPSHH dMEP YEHb dEPSHH
8H5 EM@ dHP ES8 Y8Mb. d@8P dHP ES8
.d98P 5H@ d8P MHM "YEES8M" d8P MHM
.od998P" M9S d5H HEM .dEP""YMb. d5H HEM
dE@P" E5@ 9H@8HS@8SE 5H8 9EM 9H@8HS@8SE
S@8" ES9 H5@ YS9b dM9P H5@
8H5855E9H MEM5H5E @@H "Y9@E9P" @@H