Using host headers to select app

Using host headers to select app

avatar

Running version: 2026.1.6
IIS is not in use.

Today our default app is configured with a URL of "/" and it works perfectly when just using the host name as URL in a browser.

Now we would like to host multiple "default apps" based on which host name is being accessed (like you can do with host headers in IIS).

I've tried just setting a host name of https://server.domain.com/ as URL for the app, but this just redirects the browser to /admin when accessing that host name.

Is IIS a requirement for doing this or should it be possible directly in PSU? Or am I going about this in the wrong way?

Thanks!

All Comments (1)

avatar

My understanding is that this is not available, but I'd love to be corrected or this be added. My solution was to create an app that redirects based on headers.

New-UDApp -Title 'Redirecting...' -Content {
        switch -Wildcard ($Headers.windowlocation) {
            '*host1*' { Invoke-UDRedirect -Url 'https://host1.domain.com/home' }
            '*host2*' { Invoke-UDRedirect -Url 'https://host2.domain.com/app2/home' }
            '*host3*' { Invoke-UDRedirect -Url 'https://host3.domain.com/app3/home' }
    }
}

Closed