your how-to site for community journalism

Build It! File Management

Slugs

Organized naming structures help you with better search engine rankings. Using incorrect characters can throw your server for a loop.

Follow these basic rules for naming your files:

  • Use an .html or .htm file extension on all of your HTML files.
  • Never use spaces in your file names. They make it harder for users to type and follow URLs once your pages are uploaded to your Web site.
  • Never use “special” punctuation in your file names; this includes the following characters:
    ` ~ ! @ # $ % ^ & * ( ) + = , / ? ’ ” ” : ; < >
  • You may use underscores, hyphens and periods in your file names.
  • File names are case sensitive – they know the difference between upper and lowercase letters. Pick a naming scheme and stick with it to minimize later confusion. Many Web designers use all lowercase letters in their file names.
  • Make sure your file names accurately describe their contents. It’s better to name a page links_and_contacts.html than ''page33.html''.
  • If you would like to use dates in your file names, consider using a YYYYMMDD format (for example, 20050901 for Sept. 1, 2005). This will ensure that your files are listed in chronological order when viewed in a directory. It never hurts to include a descriptive name in addition to a date in a file name – for example, schoolboard_20040514.html for a May 14, 2004 school board meeting – just to make things easier on yourself two months from now.