# Web server behavior (\`index.html\`, \`/\`, etc)

**URL:** <https://support.delta.chat/t/web-server-behavior-index-html-etc/2735>\
**Category:** Mini Apps\
**Tags:** webxdc-api-future\
**Created:** [September 22, 2023, 10:57am UTC](https://support.delta.chat/t/web-server-behavior-index-html-etc/2735 "2023-09-22T10:57:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WofWca](https://support.delta.chat/user_avatar/support.delta.chat/wofwca/32/1702_2.png) [@WofWca](https://support.delta.chat/u/WofWca)\
**Post date:** [September 22, 2023, 10:57am UTC](https://support.delta.chat/t/web-server-behavior-index-html-etc/2735/1 "2023-09-22T10:57:49Z")

</div>

This post has been transferred from [spec: web server behavior (`index.html`, `/`, etc) · Issue #61 · webxdc/webxdc\_docs · GitHub](https://github.com/webxdc/webxdc_docs/issues/61)

This came up after [feat: App Info Route by Septias · Pull Request #158 · webxdc/store · GitHub](https://github.com/webxdc/store/pull/158#issuecomment-1627378816). Basically the behavior of apps that use things like React/Vue/Solid routers is unreliable (might be broken) because it’s not clearly defined how the webxdc web server works.

### `/` → `/index.html`

The current webxdc implementations (at least Desktop and Android) open the app in such a way that the initial URL is `/index.html`, not `/`. This is because of `<iframe src="/index.html"`:

> <https://github.com/deltachat/deltachat-android/blob/3becdf52ecc2623b6d1ad5fd2195a2ee674a2c76/res/raw/webxdc_wrapper.html#L131>

> <https://github.com/deltachat/deltachat-desktop/blob/750721ca5b8e4e9c1c376c95cec470eefefd474c/static/webxdc-preload.js#L108>

Replacing `src = "index.html"` with `src = "/"` should work, as long as the server would respond with the contents of `index.html` to such a request (currently Delta Chat desktop responds with an error). Most web servers do, like Python’s http.

I believe this started being the case after [the WebRTC patches](https://delta.chat/en/2023-05-22-webxdc-security).

### non-existent → `/index.html`

Here are [Vue Router docs](https://router.vuejs.org/guide/essentials/history-mode.html#html5-mode) about how the server needs to be configured for the HTML5 history mode to work properly. It says

> If the URL doesn’t match any static assets, it should serve the same index.html page that your app lives in.

Which is a more debatable thing than just the “/” → “/index.html”, but it’s also somewhat less common to encounter a situation where it is useful, at least as of now, because currently you can’t open a webxdc app with a different initial URL. **But** you can reload a webxdc app, e.g. in Delta Chat desktop, with Ctrl+R (although currently it would just cause it to get closed because of WebRTC mitigation stuff), which would result in a 404 (or is it a network error instead? should we specify this as well?).

---

<div class="post-metadata">

**Author:** ![WofWca](https://support.delta.chat/user_avatar/support.delta.chat/wofwca/32/1702_2.png) [@WofWca](https://support.delta.chat/u/WofWca)\
**Post date:** [January 15, 2026, 5:16pm UTC](https://support.delta.chat/t/web-server-behavior-index-html-etc/2735/2 "2026-01-15T17:16:48Z")

</div>

Made a desktop MR: [improvement: WebXDC: respond with /index.html to / by WofWca · Pull Request #5944 · deltachat/deltachat-desktop · GitHub](https://github.com/deltachat/deltachat-desktop/pull/5944)  
But this forum post is mostly about the WebXDC spec.
