Naming Conventions for the Internet

Feb 23, 2023

Naming Conventions for the Internet

Feb 23, 2023

Using careful Naming Conventions for Internet URLS, directories, files and images, humans and search engines will find your work easier to read and be beneficial for SEO and Accessibility.
Naming Conventions

When naming assets such as files, pages, directories and images for the Internet, it's important to use names that are both descriptive and easy to understand. This makes it easier for both humans and search engines to understand what the content is about.  It's also very helpful when organizing folders of files and images on your computer as you prepare to upload to the website. Descriptive naming also helps make your website more accessible.

Here are some guidelines to keep in mind:

Be descriptive
Use names that accurately describe the content of the file or page. For example, if you're uploading a picture of a red wagon, a good file name might be "red-wagon.jpg."

Use hyphens to separate words
When naming files or pages, use hyphens (aka dashes) to separate words, rather than underscores or spaces. For example, use "red-wagon.jpg" instead of "red_wagon.jpg" or "red wagon.jpg."

Use lowercase letters
Always use lowercase letters when naming files, pages, or images. This helps ensure that the name is consistent across different platforms and avoids any potential issues with case sensitivity.

Avoid camel case
Camel case naming conventions are more difficult to read. You should separate words with hyphens:
https://ucanr.edu/sites/2020MGConference/ should be https://ucanr.edu/sites/2020-mg-conference/

Avoid special characters
Avoid using special characters and characters with accents in file names, page URLs and directories or image names. These characters can cause issues with some browsers and can also cause problems with URLs if not properly encoded.

Avoid Spaces or Tabs
Avoid Commas or Apostrophes
Avoid Slashes or Quotes
Avoid # & % + * = @ ~ ^ $
Avoid < > ( ) [ ] { } : ; ? !
Avoid Other Unusual Characters


Keep file names, page names, and folder names short
Try to keep file names short and to the point. This makes it easier for people to remember the name and also reduces the risk of errors when typing the name.
 
Windows limits a path to 256 characters, and folks should avoid even getting close to this limit.  Keep your folder names short, and keep your page names short. 
 
If the length of the path and file name combined exceed ~256 characters you will be able to see the path/files via Windows/File Explorer, but may not be able to delete/move/rename these paths/files.
 
This is an example of what to avoid:
"/sites/ciwr/Programs/http___rosenbergucanrorg/Rosenberg_International_Forum_on_Water_Policy_-_Regio
nal_Forums_and_Workshops/Rosenberg_International_Forum_on_Water_Policy_-_Iranian_US_Regional_Forum/Rosenberg_International_Forum_on_Water_Policy_-_Iranian_US_Regional_Forum_Partic
ipants".
 
Test Site / Temporary / Beta - are all poor choices of naming conventions for Site Builder Folders.  We are ignoring these sites when migrating to the new platform.

Be consistent
Try to use a consistent naming convention across all of your files, pages, and images. This helps make it easier to find and organize your content.

Use file types
For files and images, it's important to append the file name with the file type: .jpg, .png, .pdf, .txt, .xls, etc

Site Builder 3.0 is a powerful tool, but it has a few flaws. One of those flaws is that it takes a well named file or image, and converts it to a mostly meaningless or non-descriptive number. The upcoming IWP or Integrated Web Platform maintains your naming conventions, though it may append a name with a number to make sure the name is unique.  

Well named assets for the Internet are easier to find and understand by both humans and search engines. These assets are also more accessible for people using screen readers. The benefits outweigh any extra effort required to thoughtfully name these assets.  
 


By Stephen Dampier
Author - IT Training and Development Specialist