How to make "/" page something other than "/index.html" in static website?

When I go to server responds with contents of index.html file.

How to make static server respond with contents of index.xhtml file instead?

Deleting index.html doesn’t help (server responds with directory listing page).

project editor link

1 Like

I haven’t seen anything that would give us control over the details of how Glitch serves static sites. If it’s not already working with .xhtml, I think all you can do is post it in the features request category. And possibly start converting your files to plain HTML :grimacing:

1 Like

Static server serves XHTML with correct content-type:

printf 'GET /index.xhtml HTTP/1.0\r\\r\nuser-agent:asdf\r\n\r\n' | nc 80 | grep -i content-type


Content-Type: application/xhtml+xml

I wanted to ask if it’s possible to make / page not index.html like index.svg or index.png or index.xhtml.

I use XHTML because it errors when invalid instead of silently doing something weird.

good? :person_shrugging: then it sounds like there’s no need to convert xhtml to html

same answer as above, we users have no control over how static sites are served, other than by opening feature requests

opened feature request: Feature request: custom index file in static websites

1 Like

You can either use a node server or have an index.html file redirect to your index.xhtml file.

1 Like