# Hostnames not working correctly after upgrading to v25

**URL:** <https://forum.keycloak.org/t/hostnames-not-working-correctly-after-upgrading-to-v25/26549>\
**Category:** Securing applications\
**Tags:** admin-console, upgrading\
**Created:** [June 18, 2024, 10:15am UTC](https://forum.keycloak.org/t/hostnames-not-working-correctly-after-upgrading-to-v25/26549 "2024-06-18T10:15:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MnemoDes](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@MnemoDes](https://forum.keycloak.org/u/MnemoDes)\
**Post date:** [June 18, 2024, 10:15am UTC](https://forum.keycloak.org/t/hostnames-not-working-correctly-after-upgrading-to-v25/26549/1 "2024-06-18T10:15:55Z")

</div>

We’ve just updgraded to keycloak v25, including all the changes in the configurations files that are specified in the guideline.

Since this upgrade, we’ve been having troubles when sending requests to the admin console. It seems that, after upgrading, some requests that should have been sended to the hostname-admin route are sended to the wrong route instead (the one specified in the hostname config label).

For instance, one request before the upgrade was “[https://admin.myhostname:8443/admin/serverinfo](https://admin.myhostname:8443/admin/serverinfo)” and after upgrading, this same request is replaced by “[https://myhostname/auth/admin/serverinfo](https://myhostname/auth/admin/serverinfo)” which returns 404 not found.

The config proxy variables before updating (hostname v1):

hostname-strict-backchannel=false  
hostname-strict=true  
hostname-strict-https=true  
spi-sticky-session-encoder-infinispan-should-attach-route=false  
proxy=passthrough  
hostname-url={{ hostname\_url }}  
hostname-admin-url={{ hostname-admin\_url }}

The config proxy after updating (hostname v2):

hostname-backchannel-dynamic=true  
hostname-strict=true  
spi-sticky-session-encoder-infinispan-should-attach-route=false  
hostname={{ hostname\_url }}  
hostname-admin={{ hostname-admin\_url }}

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [June 18, 2024, 4:50pm UTC](https://forum.keycloak.org/t/hostnames-not-working-correctly-after-upgrading-to-v25/26549/2 "2024-06-18T16:50:38Z")

</div>

See

> **[Configuring the hostname (v1) - Keycloak](https://www.keycloak.org/server/hostname-deprecated)**
>
> Keycloak is an open source identity and access management solution

and

> **[Configuring the hostname (v2) - Keycloak](https://www.keycloak.org/server/hostname)**
>
> Keycloak is an open source identity and access management solution

---

<div class="post-metadata">

**Author:** ![MnemoDes](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@MnemoDes](https://forum.keycloak.org/u/MnemoDes)\
**Post date:** [June 19, 2024, 5:27am UTC](https://forum.keycloak.org/t/hostnames-not-working-correctly-after-upgrading-to-v25/26549/3 "2024-06-19T05:27:53Z")

</div>

First of all, thanks for your response.

However, we already follow that guidelines and configured everything to work with hostnames v2 (you have the current config in the first message) but we can’t make it work anyway.

Any other suggestion?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [June 19, 2024, 6:05am UTC](https://forum.keycloak.org/t/hostnames-not-working-correctly-after-upgrading-to-v25/26549/4 "2024-06-19T06:05:16Z")

</div>

There are several issues in the GitHub repo regarding using wrong hostnames/paths when using `hostnames:v2` feature, e.g.:

- [keycloak hostname:v2 /admin used on "hostname" instead of "hostname-admin" · Issue #30432 · keycloak/keycloak · GitHub](https://github.com/keycloak/keycloak/issues/30432)
- [Account UI resources try to load from admin path instead of frontend path · Issue #30541 · keycloak/keycloak · GitHub](https://github.com/keycloak/keycloak/issues/30541)

…and probably more… 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![MnemoDes](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@MnemoDes](https://forum.keycloak.org/u/MnemoDes)\
**Post date:** [June 19, 2024, 6:25am UTC](https://forum.keycloak.org/t/hostnames-not-working-correctly-after-upgrading-to-v25/26549/5 "2024-06-19T06:25:16Z")

</div>

Hello dasniko,

In that case we will wait untill a new minor release is launched or someone reports the fix for this issue.

Thanks for your response!

---

<div class="post-metadata">

**Author:** ![sebix](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sebix](https://forum.keycloak.org/u/sebix)\
**Post date:** [August 28, 2024, 8:15am UTC](https://forum.keycloak.org/t/hostnames-not-working-correctly-after-upgrading-to-v25/26549/6 "2024-08-28T08:15:37Z")

</div>

> [@MnemoDes](#):
>
> For instance, one request before the upgrade was “[https://admin.myhostname:8443/admin/serverinfo”](https://admin.myhostname:8443/admin/serverinfo%E2%80%9D) and after upgrading, this same request is replaced by “[https://myhostname/auth/admin/serverinfo”](https://myhostname/auth/admin/serverinfo%E2%80%9D) which returns 404 not found.

Do you have

```auto
KC_HOSTNAME_PATH=/auth

```

or similar set?
