Gotcha: Netlify Makes All Your Filenames Case-Insensitive

Yesterday, I posted about Making Hugo Generate Case Sensitive URLs, as a way to self-document but also because I wanted to updated my own site to render case-sensitive URLs because I noticed this was not actually rendering them as case-sensitive.

I have a number of specifically case-sensitive URLs which are randomly generated, so use mixed cases so I can decrease the chance of filename collisions.

However, I found that unfortunately this is not a thing that works with Netlify (which I use to host my site) because it actually makes all filenames lowercase, removing any case sensitivity you had set up.

This is an underdocumented gotcha that I found on their community forums. This has meant that unfortunately I've had to change the implementation of my random filename generation to not use uppercase characters.

Please don't fall into the same trap that I did, as there doesn't seem to be an alternative other than "don't have case-sensitive filenames".

From my testing, it appears that if there is a duplicate between a mixed-case filename and a lowercase filename, the filename that has a lowercase path takes priority.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

Tags

This post was filed under articles.

This post is part of the series nablopomo-2019.

Related Posts

Other posts you may be interested in:

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.