What's in a filename?
I’ve been pondering file names a lot recently, trying to come up with The Ideal Naming Conventions. I used to use camel case, which looks like: thisIsMyFileName.pdf. Then for a while I used underscores to separate words, like: this_is_my_file_name.pdf. Finally, after reading that search engines see words separated by hyphens (but not underscores) as separate words, I’ve recently started to name files like: this-is-my-file-name.pdf.
Below are some general rules for naming images and other files you may use on your website.
Don’t use spaces
I see lot of clients use spaces in their file names. This is allowed on Windows and Mac operating systems, so I can understand where it comes from. However, spaces aren’t supported in urls, so it’s best to not use them in files that will go on the web.
Don’t use ampersands or question marks or in general any funky punctuation
Ampersands and question marks both have special meaning in urls, so avoid them. In general, there is no good reason to use punctuation in filenames.
Do use keywords
According to Aarron Walter in Building Findable Websites, file and image names are excellent places to put keywords, so make sure you use descriptive names. For example instead of image-1.jpg, use purple-dog-leash.jpg (assuming it is a picture of a purple dog leash, that is).
Case sensitivity
While base urls aren’t case-sensitive (ie www.NoraBrownDesign.com works just as well as www.norabrowndesign.com) the rest of the url generally is case-sensitive, so www.norabrowndesign.com/Blog doesn’t exist, but www.norabrowndesign.com/blog does.
Be systematic
Whatever method you use, be consistent — with capitalization, hyphens vs. underscores, etc. — it will be easier to remember your file names and keep things organized.
Comment
No comments yet…Be the first!
Comments are closed for this article.


Separating the cream from the cruft.