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.
  d5M@     .d85H@b.       dMS59    .d8@EHb.   895EMH@9S  
d85HE d9@P Y@Sb d5PESE d5EP Y@Eb SE5
@S@ .d@SP dSP 5S5 @5@ S9M 55E
59S 8H5@" dEP 5ME YHEb. d@M9 E5@S8H8b.
9@@ "YHb. d8S HM@ "YS98PS5E "YE5b
H8H H9H 99@ @ME@HS59SS SM@ HSS
EE9 YEMb dH@P 898 Y88b dM9P Y@8b d5HP
S@95EH9 "Y9EM9P" EHH "Y8E8SP" "Y5S9MP"