Possible to change main/index file for Cloudflare Pages direct uploads project?

I have a Cloudflare Pages direct uploads project and I’m wondering if it’s possible to configure the main/index file for the root directory to be something other than index.html. Thanks.

That’s not really how webservers in general (as well as Pages) work.

index.html will be served at root because that’s the root document, there’s no changing it because it’s part of the web specifications.

If you want another document to be served at the root you’ll need to run a build command on Pages to mv build/otherfile.html build/index.html (replacing build/ with your output folder and otherfile.html with the other file’s name).

4 Likes

That makes sense, thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.