Best practices for relative links

When working with the University of Ottawa's Drupal platform, it is strongly recommended to use relative URLs over full URLs for links internal to a website. The reason for this is two-fold:

  • Relative links allow you to browse your website in both HTTP and HTTPS mode without interruption. Users who log in and click on a full HTTP URL can be misled to think that they got disconnected from the site and cannot edit the content on that page.
  • Images and files do not render for users outside of the University's network when they have HTTPS URLs.

1. Relative links in the WYSIWYG (text editor)

When adding a link in the WYSIWYG, simply use the full URL. We no longer recommend using relative links in this scenario.

    2. Relative links in Menu items, Related Links, Content Links, Panel Pages, Path aliases, etc.

    When you have to enter a path in a stand-alone field, like the Path of a menu item, the path of a Panel page, or the Link field of a Content Link, enter everything that follows your site name without any preceding slash.

    • Example:
    • Relative path: latest-issues/some-subpage

    This also applies to files:

    • Example:
    • Relative path: sites/

    3. What if the link is outside of my site?

    If the link is not within your site, use the full URL. For example, if I’m working on the Epidemiology website and want to make a link to the Music website (, then I’ll use the full path.

    » Submit feedback
    Back to top