What name should I give to a file that I want to publish on my web site? What characters should I not use in a file name? Is it OK to put blank spaces in a file name?
Here are a few guidelines for naming files that you intend to publish on your web site.
- Choose a descriptive name for the document. “Mary-Smith-School-Report-11-2-2007.pdf” is better than “Smith.final.updated.JM 11-2.pdf”. The first file name is intuitive and descriptive and provides a visible MM-DD-YYYY date stamp, while the second is cryptic and reveals perhaps too much of the editing process.
- Avoid using spaces in file names, because a web browser will fill in a space with the characters “%20”, so that a file named Education Report April 2007.doc becomes Education%20Report%20April%202007.doc. That file name is hard to read and recognize.
- Use dashes between words in a file name, rather than spaces. This will help search tools key on your file and could boost its rank in search results.
- Omit these RFC 3986 characters, because they confuse web browsers:
! * ‘ ( ) ; : @ & = + $ , / ? # [ ]
- Here is a good example of a file name to give to an image file for a web site:
This file name immediately tells the user the content and date of the file — and the image width, too! This is very helpful when you are trying to put together a web page.