Name files and folders - How to - Web Team - University of Canterbury - New Zealand

Name files and folders

This information will show you how to name your files and folders for the web using best practice (including PDF’s, word docs and excel files).

Note: Links on the page are for instruction. They won't take you to actual sites.

Change to best practice naming (August 2013)

Where previously an underscore _ was recommended where a file or foldername has 2 words/parts to it, a hyphen (press the minus key) is now used.

This applies to all new file and folder names where appropriate. See the instructions on this page to understand where and how to use this.

Benefits for you and your department

  • Short URLs (fit in an email without wrapping and breaking, easy to write or type if needed, works better in print)
  • No ‘%20’ text in your URL (occurs in the browser when spaces are used)
  • Easier for you to manage your site as you can quickly identify file names
  • If you include spaces in file and folder names the link may not work for some people accessing your site

Use lower case letters and hyphens

Filenames and folders are case sensitive. They should be in lowercase for easier readability and to ensure they work on all systems.

Filenames and folder names should have no spaces between words. Spaces between words and letter display as %20 in browsers. Instead use - (hyphen). To make a hyphen press the minus key on your keyboard.

Do not use any special characters such as %, ! or ?.

Date formatted file names

For file names with dates, use the format YYMMDD.shtml, for example 090611 for 11 June 2009. This will list your files in chronological order and be easy to track and manage.

Keep file and folder names short and simple

Keep your names short, succinct and meaningful. The longer the filename, the longer the URL. Long URL’s are hard to read, type or write, and wrap and break when pasted into emails. They also look ugly and intimidating in print.

The more folders you have, the longer the URL and more complex it is for you to manage. Limit how deep your folders go. Mostly 2 folders is enough. The maximum is 3.

For example avoid something like:

Instead use something like:

Examples of good and bad file names

Filename: too long and has spaces

  • Spaces are displayed as %20. This is hard to read and type/write
  • While the upper case (Q in Quickfind) displays correctly lower case should be used as they work across all systems and are easier to read
  • Shorter URL would be more effective

Improvements: file name is shorter and has no spaces

  • Spaces replaced with -
  • Name is shorter, meaningful and easier to read
  • All lowercase
  • Shorter URL
  • When the file is updated it can be called the same name and replace this one (this means no old dated files cluttering your site and fewer broken links)

Examples of recommended file names

File name Page headline (H1)
topics.shtml Study Topics
enrol.shtml Enrolment
postgrad.shtml Postgraduate Law Students
advice.shtml Course Advice
ug-advice.shtml Undergraduate Advice
m-checklist.shtml Masters Checklist

Home page file names

Your home page should be index.shtml. This doesn't need to be added to your sites URL. Within folders you should also use index.shtml as the 'home' page of that section of your site.

For example:

rather than:


rather than:

How to make a default home page link in DreamweaverMake a default link in Dreamweaver

In Dreamweaver instead of linking to the index.shtml file, drag the link globe to the folder and not the file.

In the example on the right dragging the link globe to the presentations folder will by default link to index.shtml file.

Alternatively you can type the link name into the link field box.

Creating good folder names

Guidelines for good file names apply to folder names too.

Abbreviations can be easily understood and make a difference to the length of your URL. For example, postgraduates could be shortened to postgrad, or even pg.

Examples of how good file and folder names improve URL’s


After or even abbreviate to

The after examples are shorter and are easier to read, type or write. Suitable abbreviations have been used. If pasted into an email they won't wrap onto a second line and break. They are clear and easy to read and are suited to print.

Examples of recommended folder names

Folder name Stand for
advice Course advice
undergrad or ug Undergraduate
research Research
teachbiol NZ Biology teachers
accom Accommodation