Energy.gov File Naming Conventions

When coding a website or application in Energy.gov, follow these file naming convention and directory structure requirements.

When uploading files to download pages, follow these guidelines for naming files:

  • File names should clearly describe the file's content.
  • File names should not contain uppercase letters, spaces, or special characters (e.g., & or $), but may contain letters, numbers, underscores, and dashes.
  • Use "link text" to give your PDFs descriptive names. Without link text your files will be listed by their file names. To edit a PDF's link text:
    • Upload a PDF to a Download page OR click "Edit Media" if the file has already been uploaded.
    • In the box labeled "Add or edit the link text," enter a descriptive file name.

This example shows how link text can be used:

Example of linking in Energy Savers

The Energy Saver Guide's download page demonstrates how to write the link text. The link text for the first file is "Energy Saver Guide: Tips on Saving Money and Energy at Home (PDF)." This is displayed instead of the file name.