Welcome to Cactus Juice Sign in | Join | Help

Cameron Scholtz's Blog

Enthusiasm Always Wins
Web File Naming Conventions - Best Practices

My opinions on how to name files and directories that will be part of a URL or accessible via the web.

First off, for anyone new to web publishing the most important rule to remember is do not use spaces in your file name. You can run your words together or separate them with underscores, periods or dashes, etc. Dashes, IMO, is best practice nowadays.

Use dashes to separate words.  For example instead of:
cactusjuice.edu/some office/drivingdirections.doc
cactusjuice.edu/customerservice/aboutus.html

Use dashes:
cactusjuice.edu/some-office/driving-directions.doc
cactusjuice.edu/Customer-Service/About-Us.html

Dashes are easier to read than running words together. Also, hyphens are search engine optimized (SEO). Search engines such as Google ignore the underline character.  Google sees driving_directions as drivingdirections. But Google will treat a dash as space and, as a result, will recognize the separate words.

Also, for improved user experience...
* Don't be afraid to use Title Casing.  Easier to read. 
* Don't abbreviate.  Whole words are more intuitive and better search engine optimatization (SEO).
* Don't use camel Case (first word lower myPage.html). Why? Because it's just lame.

Keep in mind that URLs are case sensitive on Unix.  URLs are not case sensitive on Windows servers.  About-Us.html and about-us.html are treated as two different pages on Unix.  Windows IIS does not care.

And this might be a little OT (off topic) but I wanted to give a shout out to dates. When including a date in my file names, I use this format: yyyy-mm-dd. This way I am assured my file names will sort chronologically.

Posted: Tuesday, March 27, 2007 7:51 AM by Cameron

Comments

No Comments

Anonymous comments are disabled