Skip to main content

Trinity College Dublin, The University of Dublin

Trinity Menu Trinity Search

You are here Web design > Naming files

Naming files

Consider the following when naming files


The following should help you produce a good readable URL

  1. Make the filename all lowercase
  2. Remove spaces
    If removing all spaces makes 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 Research News & Events.php

and finish with

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

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:

and finish with

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


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/
  • If the existing page is /contact.php, name the Irish language page /