What is a file name?

The file name is the freely selectable portion of text that appears before the file extension of a file. It should provide information about the content of a file. In search engine optimisation, it is considered a ranking factor as part of the URL.

What is the file name?

If we take a look at the URL of an image as an example, we can easily show the part that constitutes the file name:

components of a filename
2
filename
1
extension
A complete URL showing the filename and extension.

The file name 1 and extension 2 can be clearly seen in this URL. The file extension, in this case, is html – an HTML file. Some websites offer web pages with the extension hidden from view.

The file name can be used to give a file an individual name, so that it can be easily distinguished from other files. The file name can also be used to provide information about the content of the file.

A file extension, e.g. .png, .pdf and .html, is appended to the user-selectable file name; it contains additional information about the file type.

The directory in which the file is located also ensures that files are clearly distinguished in cases where there are several files with the same name in different directories.

As a rule, a file name should not exceed 256 characters. Furthermore, special characters such as umlauts should be replaced and special characters should not be used. Spaces must also be converted.

If this is not possible, umlauts and special characters must be URL-encoded accordingly. Spaces should be represented by a hyphen and capitalisation should be avoided.

Pay attention to upper and lower case

In many common operating systems, file names are ‘case-sensitive’ – i.e. upper and lower case makes a difference. This behaviour has also been transferred to URLs on the internet. For browsers and search engines, https://www.sistrix.com/data.html and https://www.sistrix.com/Data.html are different files. This means that they are not cached uniformly, and this can also lead to duplicate content problems.

Significance with regard to search engine optimisation

In search engine optimisation, file names can provide helpful information about the content of the document or file.

If HTML documents and PDFs are given meaningful file names, Google can use this information to classify the content of the file. It is thus a very low ranking factor.

In Image SEO, on the other hand, the file name plays a more decisive role, as there are not very many ways to recognise the content of the image. In addition to the name of the image, the name of the corresponding directory is also helpful.

Steve Paine
08.03.2021