Naming Files & Folders
Your web files will be viewed by numerous users who use a wide variety of operating systems (Mac, Windows, and Linux for instance) and devices (desktops, tablets, and smartphones are some examples). Therefore, it is essential to play it safe and avoid common illegal directory and filename characters.
Naming conventions are important in web folders as well as for downloadable files such as PDFs, Word documents, and Excel spreadsheets.
Do not use any of these common characters/symbols in filenames and folders:
Characters/Symbols | ||
# pound | < left angle bracket | $ dollar sign |
% percent | > right angle bracket | ! exclamation point |
& ampersand | * asterisk | ' single straight quotes |
{ left bracket | ? question mark | " double straight quotes |
} right bracket | / forward slash | : colon |
back slash | blank spaces | @ at sign |
Also, keep these rules in mind:
Don’t start or end your filename with a space, period, hyphen, or underline.
Keep your filenames to a reasonable length and be sure they are under 31 characters.
Most operating systems are case sensitive; always use lowercase.
Avoid using spaces; use a hyphen or underscores instead.
Bad Filenames | What Web Browsers See |
My Project Name.html | My%20Project%20Name.html |
My PDF File#Name.pdf | My%20PDF%20File%23Name.pdf |
Good Filenames:
index.html
my-pdf-file-name.pdf
Note: This list is not exhaustive. It is meant to help you avoid common errors in filenames. If you have any questions or need any assistance, do not hesitate to contact webmaster@cmoa.org.
Last updated