Many servers have the option to distinguish file names based on the case of the letters that make up the file name. Web Hosting Hub servers are Linux-based and use case sensitivity on all hosting servers. The following article gives a quick summary of how this can affect your file names and advice on how to avoid the issue using best practices when developing your website.
One of the most puzzling things about case sensitive issues for files names is that it will not always display an error explicitly describing the problem Additionally, it will list the file, but unless you happen to NOTICE that the letters have a different case, you may miss it entirely. Here's an example:
FirstNameAbc.jpg
firstnameabc.jpg
In the first name, you can see that the "F", "N" and "A" are capitalized, but the second name is ALL in lower case. If these two files were in the same folder, they would be considered two DIFFERENT files due to the difference in case.
File extensions are part of the file name and therefore they are also affected by case sensitivity. Here are some examples of file extensions:
.Web_file.HTML
This is different from:
web_file.html
The files above show the HTML extension displaying how it can be set with different case.
Image extensions should also match in spelling:
image.jpg
Is Not the same as:
image.jpeg
Although the extensions BOTH indicate a JPEG file, the JPG extension is still spelled differently from the other JPEG, so these file names would be handled as two different file names.
If you are working with your files in File Manager, an FTP client like FileZilla, or the command line (on VPS/Dedicated servers) we recommend following the best practices for file naming. See the below:
You do not have to use the Linux best practices - that is completely up to you. However, to avoid the issues that you can see with case sensitivity, it is important that you establish a standard for the naming of your files. This becomes very important if you are working with more than one person. Different people may have different ideas on how to name your files. Simply establish your file name standards before the project starts and ensure that people know and are aware of the standards. This will help to minimize file naming issues and prevent your from having to track down possible issues that could easily have been avoided by simply naming the files in uniform way.
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: | 757-416-6627 | Chat: | Click To Chat Now |
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!