Skip to main content

Trinity College Dublin, The University of Dublin

Menu Search



Naming files

Please consider the following when naming files

  • Readability
  • Longevity
  • Irish language and internationalisation

Readability

The following should help you produce a good readable URL

  1. Make the filename all lowercase
  2. Remove spaces
    If removing all spaces make the filename ambiguous replace spaces with hyphens
  3. Use a limited set of characters, for example only a to z, 0 to 9 and hyphens ("é" replace with "e", "&" replace with "and" etc.)
  4. Remove non-essential words like "and", "or", "the", "with" etc. so you are left with keywords
  5. Where possible limit technology indicators (.php), see the section below for complete instructions
  6. Remove repeated words, with respect to the final URL

For example the following steps illustrate how to go from
tcd.ie/area/research/Our Research News & Events.php

and finish with
tcd.ie/area/research/news-events/

  1. our research news & events.php (filename made lowercase)
  2. our-research-news-&-events.php (spaces replaced with hyphens)
  3. our-research-news-and-events.php (limit the set of characters being used)
  4. research-news-events.php (remove non-essential words)
  5. research-news-events/index.php (limit technology indicators)
  6. news-events/index.php (remove repeated words, "research" was already in the final URL therefore better removed in this instance)
  7. The final URL becomes tcd.ie/area/research/news-events/

Please see the ISS website for further details on Naming Files & Folders and Using Appropriate URLs.

Where possible limit the technology indicators (.php)

For example start with:
tcd.ie/area/research/news-events.php

and finish with
tcd.ie/area/research/news-events/

  1. Using tcd.ie/area/research/news-events.php by example
  2. In the research folder, create the folder news-events/
  3. Move news-events.php into the newly created folder
  4. Rename news-events.php to index.php
  5. You should now have tcd.ie/area/research/news-events/index.php
  6. This page can now be viewed in the browser in two ways
    tcd.ie/area/research/news-events/index.php
    and
    tcd.ie/area/research/news-events/

Longevity

Longevity is primarily about whether the document represents the latest information, or an archive. The practical difference is whether to include date information in the filename or not.

Let's say you have a PDF brochure relevant for the academic year 2014-2015 ready to upload. Do you name it "brochure.pdf" or "brochure-2014-2015.pdf" or both?

  • If no online archive of the brochure is wanted then name it "brochure.pdf"
    Each following year overwrite "brochure.pdf" with the latest version. People can bookmark this document without updating the bookmark in future and websites links point to this document and can remain the same year-on-year
  • If an online archive is wanted, which means you want to provide access to historical versions of the brochure, name it "brochure-2014-2015.pdf"
    Each following year upload another document with the date in the URL e.g. "brochure-2015-2016.pdf", "brochure-2016-2017.pdf" etc.
  • If an online archive and latest information of the brochure is wanted then provide two documents "brochure-2014-2015.pdf" and "brochure.pdf"
    Make sure to limit linking to "brochure-2015-2016.pdf" to only when referring to the archive version, for example from an archive listings page. For all other links use "brochure.pdf" as it represents the latest information

If the brochure is a web page the following URLs would be equivalent to those given above: "brochure/index.php", "brochure/2014-2015.php"

Irish language and internationalisation

An Irish language page will typically be an equivalent of an existing page. If this is the case they are named as follows to best integrate with a language switcher on the website:

  • If the existing page is /contact/index.php, name the Irish language page /contact/index.ga.php
  • If the existing page is /contact.php, name the Irish language page /contact.ga.php.