UCSF University of California, San Francisco      About UCSF       Search UCSF       UCSF Medical Center     
  Education & Training    Research    Patient Care   
 
 
Information Services Unit
Web Resources
Announcements
Web Techniques
Web Worker Meetings
Training Resources
Web Style Guide
 

File Naming Conventions & Directory Structure

Background

File and directory naming conventions are key to creating a well-organized site. Organization provides many benefits, not the least of which is helping your visitors navigate your site.

Web users often try to guess or remember URLs. A consistent directory structure helps people to navigate intuitively . For example, if they can find bios for faculty members under medschool.ucsf.edu/bios/faculty/, they are likely to look for student bios under medschool.ucsf.edu/bios/students/.

When sites are well organized to begin with, directory and file names are less likely to be changed later, avoiding broken links and bookmarks.

A well-organized, orderly site can easily be understood when the time comes to pass along responsibility for the site.

Specific Guidelines

  • Important: File names must end in .aspx, not .htm or .html.

  • File names may not contain uppercase letters, spaces, or special characters (e.g., &,#,/ ,$, etc). They may, however, contain letters, numbers, underscores, and dashes (e.g., image01.gif, not image#1.gif; newsletter_010203.aspx, not newsletter_01/02/03.aspx, not newsletter_01.02.03.aspx.)


    Note:Please keep this in mind when creating a PDF from a Word document. More than likely, you will need to rename the PDF to something more 'web-friendly.

  • Use separate subdirectories for major subsites or content categories linked from the main site.

  • Keep PDF's in a separate file, do not mix them in with your .aspx files. Name this folder 'PDF'. If you use many PDF's on your site and they fall under various categories, place a folder called 'PDF' in each category folder.

    This same principal applies if you use .doc or .rtf files on your site. If you have PowerPoint presentations on your site, organize them into a 'PPT' folder. Give each presentation a separate folder of its own within the 'PPT'.


    Equally, all images must be in the images folder, not strewn amongst the other folder types on your site.


    Put PDF's Together in Their Own File

    If you have several batches of images, pdf's or doc's that specifically relate to certain subsections of your site, such as 'policies' or 'bios', consider creating a subfolder in that section to house these files separately from more general files.

    In this example, there are several pdf's relating specifically to news, so they have been grouped in a directory called pdf which resides within the news folder.




  • Make sure that file names clearly denote their content. Try to avoid abbreviations that may not make sense to the user (e.g., patient_info.aspx, not patinfo.aspx; admin_services.aspx, not adminser.aspx.)

  • Delete all extraneous, nonlinked (orphan) files. Notify the WebResources team of the files you have deleted so that we can remove them from Staging and Production

    Do not keep working files in your site only current web files. If a page needs to be stored for work or reference later, please do so on your C drive or on a shared department drive.

    Please do not leave .psd files on your site.

General Guidelines

  • URLs must be as logical and clear as possible and make sense to people not familiar with the School of Medicine or your with department. Use unabbreviated words or common acronyms. They should be easy to remember and easy to spell (e.g., medschool.ucsf.edu/patient_info/ not medschool.ucsf.edu/patinfo/.)

    With that in mind, URLs should still be as short as possible Longer URLs are harder for people to remember and to type and are often broken when sent through e-mail (An e-mail allows about 70 characters per line).

  • File names should be based on the page title. Avoid overly general file and directory names (e.g., about.aspx, contact.aspx, not file1.aspx, file2.aspx).

  • Use numbers only if there is a compelling reason to do so, such as a date (e.g., not review1.aspx but 09_03_review.aspx.)

  • The home page of a directory/folder should always be named index.aspx. This allows for shorter URLs as users can "chop off" the file name and still get to the page (e.g., medschool.ucsf.edu/ defaults to medschool.ucsf.edu/index.aspx.)

  • Divide larger groups of files into subdirectories.
    If you have several files in a directory called policy_lunch.aspx, policy_smoking.aspx, policy_sicktime.aspx, move them into a subdirectory called policy and call them lunch.aspx, smoking.aspx, sicktime.aspx.

  • If you have a document that is updated periodically such as an application form, do not affix a date or a version number to it. That way, when it is time to update the file, you can just overwrite it with the updated file of the same name and you will not need to locate all links to the file to update them, they will point to the correct file automatically.

    For example, if you have a yearly application form and it is named application_2003.aspx, you will probably call the updated one application_2004.aspx. In this case all the links pointing to the application will have to be changed accordingly. However, if the file is simply called application.aspx, you will not have to change any links when you update it.

    Additionally, keep in mind that though you can upload files to the live site, you cannot delete them from there, so versions will accumulate there. A search may turn up these pages, displaying outdated or inaccurate information.

    Common Elements
    If your site has a large number of files, consider using the following directories to help organize your content.

    About
    about/
    Information about people in the program, organizational charts and responsibilities, policy, mission, vision, success stories, outreach activities, and contact lists.

    about/bios
    Specific bio pages for each faculty member, student, etc. If you have more than one type of bio, group similar ones together (e.g., /about/bios/faculty/ ; about/bios/students/ etc.)

    News
    news/
    Current program or industry news.

    news/archives
    Archived articles

    Events
    events/
    Information on any related conferences and events.

    Newsletters
    /newsletters/
    NOTE: This convention will depend on the frequency of publication.

    Annually
    annual_report/2001.aspx
    annual_report/2002.aspx
    annual_report/2003.aspx

    Monthly
    newsletter/2003/january.aspx
    newsletter/2003/february.aspx

    Weekly
    newsletter/2003/0107.aspx
    newsletter/2003/0114.aspx
    newsletter/2003/0128.aspx

Updated: May 17, 2007
    Site Map    Contact Info     ©UC Regents