Rules

Secret ingredients to quality software

Do you know how to name documents?

Last updated by Tiago Ara├║jo [SSW] on 28 Mar 2021 09:51 pm (8 months ago) See History

When naming documents, use kebab-case to separate words to make your files more easily discoverable.

Avoid spaces

Monthly Report.docx

Bad example: File name uses a space to separate words

As far as search goes, using spaces is actually a usable option. What makes spaces less-preferable is the fact that the URL to this document will have those spaces escaped with the sequence %20. E.g. sharepoint/site/library/Monthly%20Report.docx. URLs with escaped spaces are longer and less human-readable.

Know more on Do you remove spaces from your folders and filename?

Avoid CamelCase

MonthlyReport.docx

Bad example: CamelCase - File name doesn't have spaces but also doesn't contain any separators between words

This is a popular way to combine words as a convention in variable declarations in many coding languages, but shouldn't be used in document names as it is harder to read. Also, a file name without spaces means that the search engine doesn't know where one word ends and the other one begins. This means that searching for 'monthly' or 'report' might not find this document.

Avoid Snake_Case

Monthly_Report.docx

Figure: OK example - underscored (Snake_Case) URLs have good readability but are not recommended by Google

Underscores are not valid word separators for search in SharePoint, and not recommended by others. Also, sometimes underscores are less visible to users, for example, when a hyperlink is underlined. When reading a hyperlink that is underlined, it is often possible for the user to be mistaken by thinking that the URL contains spaces instead of underscores. For these reasons it is best to avoid their use in file names and titles.

Use kebab-case

monthly-report.docx

Good Example: kebab-case - File name uses dashes to separate words

A hyphen (or dash) is the best choice, because it is understood both by humans and all versions of SharePoint search.

You may use Uppercase in the first letter in Kebab-Case, however it's important to keep consistency

Extra

  • Add relevant metadata where possible

If a document library is configured with metadata fields, add as much relevant information as you can. Metadata is more highly regarded by search than the contents within documents, so by adding relevant terms to a documents metadata, you will almost certainly have a positive effect on the relevance of search results.

  • Use descriptive file names and titles

The file name and title is regarded more highly by search than the content within documents. Also, the title or file name is what is displayed in the search results, so by making it descriptive, you are making it easier for people who perform searches to identify the purpose of your document.

Adam CoganAdam Cogan
William YinWilliam Yin
Matt WicksMatt Wicks

We open source. Powered by GitHub