URLs and File Naming

URLs are an important factor for both search engine optimization (SEO) and user-experience, and an important factor to consider when building your site structure and navigation scheme. For larger websites, a little advance planning is required.

Crafting the URL text

Human readable with keywords

  • Use "human-readable" URLS – i.e. a string of real words – not abbreviations or acronyms – that indicate the content of the page.

  • Use a hyphen to separate words. Do not use underscore, as search engines do not recognize them as separators. Do not use other special characters, as this may cause them to fail.

  • Ensure that every page URL includes a distinct keyword that best described the content of the page.

  • Use lower-case letters only. Upper-case letters can fail on some operating systems.

Organized structure

Revealing your site architecture via your URL path or folder structure can orient users and enhance usability, both on page and in search engine results. This means that child pages in a site should include the url path of its parent page. A structured URL helps both users and search engines understand where they are on your site. It also reveals what you have determined is the most important content.

Avoid creating multiple pages that fall outside your site's content hierarchy. There should be a small number of level 1 pages

Shorter is better

  • Short addresses with 2-3 unique and easy-to-understand keywords look attractive and are much easier to remember and enter manually in a browser.

  • While the maximum length of a URL is more than 2000 characters (i.e. a browser can process a long address), longer URLs have a negative impact on search engines. Aim for 50-75 characters as a maximum.

  • While WebPublish will automatically generate a URL for each page based on its page title, be aware that this can lead to superfluous and repeating words, and create URLS that are longer than necessary.

Putting it all together:

Human readable, keyword-rich, organized, short

Consider a set of three nested pages created at the top level of a website (i.e. the first is a parent of the second, and the second a parent of the third) where the subject matter is your dog:

  • The heading/title of the first page is Meet My Dog. Including the site domain (not the Queen's domain in this example), the automatically generated URL would be www.sitename.ca/meet-my-dog. This would be shown in the URL alias field in the editor area as "/meet-my-dog". For this page, shorten the automated URL path for this page to "/my-dog"

  • If the heading of the second page is Tricks My Dog Can Do, the auto-generated URL path for this page would be /tricks-my-dog-can-do. But you already have "my-dog" in the parent page URL, so shorten this to /tricks.

  • For the third page, titled Awards My Dog Has Won for Tricks, the auto-generated URL path would be awards-my-dog-has-won-tricks. (Note that the URL generator has dropped the conjunction "for"). Again, you already have some of these keywords in the inherited URL path, so you could shorten this to /awards.

In the end, you have shortened the URL considerably while maintaining a human-readable URL path that contains strong keywords that describe the content of each page along the way.

Before www.sitename.ca/meet-my-dog/tricks-my-dog-can-do/awards-my-dog-has-won-tricks 75 characters
After www.sitename.ca/my-dog/tricks/awards 36 characters

Linked documents

File names for linked documents should follow many of the same same principles as URLs in that they should be:

  • human readable
  • short
  • free of special characters
  • meaningful
  • free of blank spaces

Spaces in a file name translate to "%20" when they go online. Rewrite them using hyphens between readable words before loading them to the serve.

Consider that linked documents may end up on a user's desktop of in a downloads folder. Prepending a file name with the letters "QU", for example, might be helpful to indicate a Queen's document. Including date details or version numbers in the file name (as well as in the document itself, of course) can also be helpful. The Records Management and Privacy Office provides further guidance on document naming.

Learn more: Creating and Maintaining File Naming Standards

Documents and usability

Please note that linking to documents is not the best way of delivering content online, as the formatting of documents pose accessibility and usability issues.

Lean more: PDFs and Downloads

Image paths

Consider, as well, the naming of photo and illustration file names. Again, file names should be human readable, short, and free of special characters, and should include meaningful keywords.

Learn more: Photo and Video Standards (login required)

URL Redirects

Whether you are simply moving content to a new page, revising your site architecture, or launching an entirely new site, it is important to plan for creating redirects for URLs that will no longer exist. Learn more about URL redirects.