Drupal Links in Content

Most of the sites that Coda builds using the Drupal CMS use Friendly URL Aliases that are Search Engine Optimized. Friendly URL Aliases are automatically generated from the page Title field and will change whenever the Title field is changed. Since the Friendly URL can change it is important to use a System URL in content so that they will always work even if the page title has changed. Drupal will automatically rewrite the System URL to a Friendly URL in content so the Friendly URL functionality will remain in effect.

Drupal System URLs<

By default Drupal uses a query string for content page URLs that follows the pattern:


Most web servers will automatically serve the index.php file by default so the URL can also look like:


These URLs are not easy to remember, are not descriptive of the content, and are difficult to type in manually. To improve the format of the URL Drupal has the option of Clean URLs that rewrite the orginal URL into a nicer format.


The important part of this URL is node/215 which is the System URL.

Friendly URL Aliases<

Friendly URL Aliases take this process a step futher and generate a natural language URL from the Page Title. The Friendly URL is easier for visitors to remember, easier to type in manually, and provides better Search Engine Ranking. Search Engines typically pick up on the words used in URLs and give a better ranking for the page if the words are in the URL, Page Title, and Page Contents. For example the page you are currently reading has an automated Friendly URL Alias


Since the Friendly URLs can change we should always use the System URL when creating links in content.

Automatic Drupal System Links<

Coda highly recommends the Automatic Drupal System Links feature that greatly simplifies the creation of internal system links in content. If your site has this feature installed you will see a button on the WYSIWYG editor that looks like Automatic Link Button. Adding a link with this button is very easy:

  1. In the WYSIWYG editor select the text you wish to apply the link to.
  2. Click on the link button Automatic Link Button
  3. A window will open with Insert Link helper.
  4. Start typing in the Title of the page you wish to link to in the Link to field. This field is case sensitive so Drupal Links in Content is not the same as drupal links in content.
  5. A drop down list of matching content items will appear.
  6. Select the content item from the list.
  7. Click the Insert button.
  8. The Insert Link helper window will close and the link is created.

Manual System Links<

If your site does not have the automatic link button Automatic Link Button it will use the standard link button Standard Link Button. When creating links using the standard link button we have to be more vigilant and remember to always use the System URL.

Finding the System URL<

The easiest way to find the system URL is to follow these steps:

  1. Make sure you are logged in using and administrative account.
  2. Navigate to the page you wish to link to.
  3. If you see an Edit button click on it.
    1. The current URL should now look like http://www.codamoda.com/node/126/edit.
    2. We remove the domain name http://www.codamoda.com/ and /edit from the URL to get the system URL. In this case it would be node/126.
    3. So node/126 is the system path to use for a link.
  4. 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.

Manually Create an Internal Link<

Now that we know the System URL we can manually create the link.

  1. In the WYSIWYG editor select the text you wish to apply the link to.
  2. Click on the link button Standard Link Button
  3. A window will open with Insert Link helper.
  4. Type in the System URL into the Link URL field.
  5. Click the Insert button.
  6. The Insert Link helper window will close and the link is created.

Incorrect Internal Links<

All of the following link examples are incorrect when used to link to internal site content. In all the examples the correct Internal Link would be node/215


Internal links should not have the domain name in them. In this case the domain is www.codamoda.com

IP numbers should never be used in links. If linking to an external web site then the Fully Quanlified Domain Name FQDN should be used. Internal Links should not use the domain.


Friendly URLs can change and should not be used.


Links to an edit page will not work for web site visitors.


The "/" at the beginning makes this a fixed link to the site root. In most cases this will not be a problem but sometimes it can and therfore should be avoided.


The http:// at the beginning of this URL will cause it to fail because http:// can only be used in front of a domain name. This URL will actually cause the look up of the www.node.com domain.

More Info about Links<


What module adds the ADSL feature?

This is a really great tutorial for someone who is already using a pre-built drupal site, but for those of us who are trying to achieve the effects you describe, can you please add which WYSIWYG editor you chose, and which module adds the Automatic Drupal System Links feature to that editor?

It would also be nice if you could add an overview of the configuration required for that module. I'd imagine it involves both a filter that needs to be applied to the text format, as well as a plugin which needs to be configured in your WYSIWYG editor settings.

I'd love to know more,

Jen Lampton wrote 9 years 1 week ago
gbrandys's picture

Modules used

Hi Jen, We recommend the following modules:

gbrandys wrote 8 years 6 weeks ago

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.
  .dM@@Hb.   8@@9HEM5S       dM5@@    .d8H9Sb.   8@@9HEM5S  
d89P Y@Eb SMS dHPE@5 d5MP YE@b SMS
99E MM8 d5P 8HE HE9 MM8
.d5SP 8S989S5b. dEP E@S @9Ed8E8b. 8S989S5b.
.odM55P" "Y5@b d5@ 9@5 E@8P "YMSb "Y5@b
dH5P" 9EH 9H@ME9985M @55 955 9EH
5M8" Y5Hb d9@P @H@ YHSb dS@P Y5Hb d9@P
E@EHMH989 "YM589P" 8ES "Y5MSHP" "YM589P"