File Naming

Naming Images & Other Files

For various reasons, including SEO (search engine optimization) and usability, we encourage web authors to consider the following when naming images and files:

  • Brevity - Packing "keywords" into filenames rarely if ever improves SEO (for search engine ranking) and should be avoided. Filenames should not be sentences, but rather words, and should be short enough to discern what the file includes.

  • Relevance - Files should be named according to the information they contain, as many search engines compare the contents and filenames for ranking purposes. The closer the relationship between the filename and the content included in the file, the higher the content will be ranked by a search engine.

  • Simplicity - Keep filenames simple and intelligible. When possible, use readable words rather than ID numbers. Consider using friendly URLs for web page addresses to be shared with the public.

  • Syntax - Avoid all special characters with the exception of the hyphen (dash). Remove all spaces from file names.

    • Special Characters
      • Some characters are reserved for special uses within web addresses (URLs), i.e. $, &, +, /, =, ?, { }, [ ] , ( ), comma, apostrophe.
      • Other characters may be misunderstood by the web browser and converted to the URL encoded character. Ex. ? = %3F

    • Spaces
      • Please avoid spaces in all image and file names!
      • Though Windows and Macintosh computers allow the use of spaces in filenames, the Web is based on UNIX protocols that do not recognize spaces. The result of using spaces could be broken links and/or confusion on behalf of the visitor because spaces often are interpreted as %20 by web browsers.

    • Underscore
      • When a URL that includes an underscore is referenced in Word, e-mail, or even on some websites, the underscore easily can be misinterpreted as a space since the programs automatically apply an underline to web addresses. Remove any possibility of confusion for your audience by avoiding underscores and using the hyphen or dash in naming files.
      • Additionally, using hyphens may help with search engine optimization, because many search engines will read hyphens as word separators and underscores as word joiners. For example, web_test would be read as one word by a search engine, and web-test would be read as two keywords.

Be sure to keep image file names in mind also. Never use the default filename assigned to an image by a digital camera. Ex. WIN_0011.JPG, _DSC0015.JPG, IMG_2204.JPG, and the like. Use logical words for naming images. Doing so will help with SEO and usability. In regards to SEO, by providing search engines with textual information for images, your site will benefit from both better placement in search returns and improved positioning in image search results. Remember to use hyphens rather than underscores to separate words.