# Pages: usernames with an underscore get "malformed host name" (HTTP 400)

**URL:** <https://forum.codefloe.com/t/pages-usernames-with-an-underscore-get-malformed-host-name-http-400/207>\
**Category:** Pages\
**Created:** [October 6, 2026, 4:33pm UTC](https://forum.codefloe.com/t/pages-usernames-with-an-underscore-get-malformed-host-name-http-400/207 "2026-10-06T16:33:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bodo\_te](https://forum.codefloe.com/user_avatar/forum.codefloe.com/bodo_te/32/214_2.png) [@bodo\_te](https://forum.codefloe.com/u/bodo_te)\
**Post date:** [October 6, 2026, 4:33pm UTC](https://forum.codefloe.com/t/pages-usernames-with-an-underscore-get-malformed-host-name-http-400/207/1 "2026-10-06T16:33:04Z")

</div>

My username is `bodo_te`. I published a static site from the `pages` branch of `bodo_te/blog`. Following the announcement, it should be at `https://bodo_te.codefloe.page/blog/`.

The site is not reachable:

```auto
$ curl -s https://bodo_te.codefloe.page/blog/
malformed host name "bodo_te.codefloe.page"

```

- DNS resolves, and the TLS certificate is valid.
- The Pages server returns `HTTP/2 400` with the message above.
- Browsers reject the hostname too, because underscores are not valid in hostnames (RFC 952/1123).
- `https://bodo-te.codefloe.page/blog/` returns `site not found`, so underscores are not mapped to hyphens.

Usernames with underscores are valid on CodeFloe, so every such user is affected.

Questions:

1. Is a mapping planned, for example `_` → `-`?
2. Can a custom domain work as a workaround? The `CNAME` target `<username>.codefloe.page` also contains the underscore.
3. Is a rename of the account the only fix for now?

Thanks!

---

<div class="post-metadata">

**Author:** ![bodo\_te](https://forum.codefloe.com/user_avatar/forum.codefloe.com/bodo_te/32/214_2.png) [@bodo\_te](https://forum.codefloe.com/u/bodo_te)\
**Post date:** [October 6, 2026, 4:43pm UTC](https://forum.codefloe.com/t/pages-usernames-with-an-underscore-get-malformed-host-name-http-400/207/2 "2026-10-06T16:43:47Z")

</div>

…obwohl eigentlich hier : [https://codefloe.com/bodo\_te/blog/settings/pages](https://codefloe.com/bodo_te/blog/settings/pages) das gezeigt wird:

 ![Bildschirmfoto 2026-10-06 um 18.42.57](https://cdn.forum.codefloe.com/original/1X/2c883acd3edec31de17fd628b20045d90d02cfa6.png)

und obwohl ich im branch “pages” doch schon eine index.html mit “Hello Welt” gepushed habe

---

<div class="post-metadata">

**Author:** ![codefloe](https://forum.codefloe.com/user_avatar/forum.codefloe.com/codefloe/32/347_2.png) [@codefloe](https://forum.codefloe.com/u/codefloe)\
**Post date:** [October 6, 2026, 4:46pm UTC](https://forum.codefloe.com/t/pages-usernames-with-an-underscore-get-malformed-host-name-http-400/207/3 "2026-10-06T16:46:58Z")

</div>

We’ll take a look, stay tuned!

---

<div class="post-metadata">

**Author:** ![codefloe](https://forum.codefloe.com/user_avatar/forum.codefloe.com/codefloe/32/347_2.png) [@codefloe](https://forum.codefloe.com/u/codefloe)\
**Post date:** [October 6, 2026, 6:08pm UTC](https://forum.codefloe.com/t/pages-usernames-with-an-underscore-get-malformed-host-name-http-400/207/4 "2026-10-06T18:08:42Z")

</div>

Two issues:

1. The Pages server rejected any hostname containing an underscore with `400 malformed host name`. We’ve enabled underscore support on all Pages nodes.
2. CodeFloe turned the `_` in your username into a `-` when publishing. The Pages server then looked for a repository `bodo-te/blog`, didn’t find one, and refused the upload. That’s why the settings page showed `bodo-te.codefloe.page` and “Not published yet”. The hostname now keeps your username as it is.

Your site is now live at [https://bodo\_te.codefloe.page/blog/](https://bodo_te.codefloe.page/blog/). We republished it from your current `pages` branch, so you don’t need to do anything.

To your questions:

1. No mapping is needed anymore: `bodo_te.codefloe.page` is the address.
2. Yes, custom domains work. Point a `CNAME` at `bodo_te.codefloe.page`; DNS allows the underscore there.
3. No rename needed.

One caveat for others reading: account or organization names that contain a dot (e.g. `foo.bar`) still can’t use Pages. The dot would split the hostname into two parts, and our certificate covers only one. Enabling Pages for such a name now shows an explanation instead of failing silently.
