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.
Benefits for you and your department/team
- 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 won't work for all people accessing your site
Use lower case letters and underscores
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 _ (underscore). To make an underscore press SHIFT and then the – key (between the 0 and = 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: www.dept.canterbury.ac.nz/postgrads/research/library/publications/070606/document.shtml
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)|
|postgrad.shtml||Postgraduate Law Students|
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.
Make 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
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|
|undergrad or ug||Undergraduate|
|teachbiol||NZ Biology teachers|