Best Practices When Naming Files for the Web

Posted on Thursday, October 25, 2012 at 8:00 AM

adobe document file iconDid you know that when you name files for the web that you should follow a slightly different formula then when you name files for your computer?

When preparing documents or photos to upload to your website, the best way to name your files is to make sure that you do not have any spaces in the file name. The reason for this is because if you have spaces in your file name, then the URL string to your directory becomes very messy. Instead of using a space to separate the words, you should use an underscore ( _ ) or a dash ( - ) .

File Naming Examples For the Web - Right & Wrong Way

If you upload a document to your website and replace the spaces with underscores in the file name, example "the_name_of_my_file.pdf”, the URL string would look like the first example below. But if you upload a file to your website with spaces in the name, example “the name of my file.pdf”, the URL string would look like the second example below. 

  1. http://tastycms.com/file/the_name_of_my_file.pdf
  2. http://tastycms.com/file/the%20name%20of%20my%20file.pdf

It's important that the URL string is clean and easy to read. This especially comes in handy when you make files such as brochures and information packets available for download on your website. What if you wanted to email the link directly to someone? Based on the 2 examples listed above, the first URL string reads better and is clearer.

Please note that the file name should be all lower case letters. Additionally, the file name should be a short description containing key words of the file.

If you are going to submit your URL for tracking purposes, it is best to make sure that the URL is clean and friendly before you start this process.

Recap of the Best Practices for Naming Files on the Web

  1. No spaces in the file name
  2. No symbols or special characters
  3. Letters should be all lowercase
  4. File name should be a short description containing the key words of the file

« Previous PostGoogle's SEO Tips For Startups Next Post »Favorite Holiday Albums


Blog

Archives

Tags