How to organize your website's files

Site Bytes web tips for county sites
Site Bytes web tips for county sites

Sometimes when we're in a hurry or we aren't sure where to put something we stick it in the most convenient place. On a website, that place is usually the root directory. After a while, the root directory starts to look like a junk drawer. When it gets too cumbersome to scroll through, we start sticking stuff in other directories. Before we know it, we have so many files scattered all over the place, we can't find anything.

When we make it easier for humans to find and identify files, we also make it easier for search engines. Following best practices can help you optimize your images for search and drive more traffic to your site. In fact, last year MOZ reported a third of all searches performed in Google are performed in Google Image Search.

According to Google's Image Publishing Guidelines, Google uses the path to an image and the file name to help understand it. The path describes where a file is located. Although there are no hard rules on what the path should be, it's common practice to place images in an "images" subdirectory (also referred to as a subfolder).

EXAMPLE (on a county site)
statewide/dakota/images

Similarly, you can organize other files types into their own subdirectories.

statewide/dakota/media (for audio and video files)
statewide/dakota/doc (for word and excel files)
statewide/dakota/pdf (for PDF files)

▶ Watch video "Create file directories on a county site" (0:44)

In addition to organizing files, it's important to follow best practices when naming files. Often, this means renaming files before uploading them to your site. For example, images taken off a phone or camera should be renamed to be more meaningful and descriptive. Also, files saved on your desktop or in Box often have spaces, which should be replaced with hyphens.

Best Practices for Naming Images

  • Use a short descriptive name
  • Separate words in the file name with hyphens (not spaces or underscores)
  • Lowercase letters
  • Include the file extension on the end (.jpg, .png, .gif, .xlsx, .docx, .pdf etc.)

Not recommended
201548755_2455858.jpg
4-h horse show.jpg
4-hHorseShow.jpg
4-hHorseShow

Recommended
4-h-horse-show.jpg


###
Site Bytes is a regular column in Nebraska Extension – Keeping UP that provides quick tips for enhancing your county website. Written by Anne Holz, IANR Media web strategist.