Custom domain redirects to base domain

Problem statement

When we visit our custom domain directly (e.g., auth.custom.tld) it will redirect to the base domain (custom.tld in this example). We would expect to be redirected to the default login URI instead. Is there a way to change this?

Solution

That actually is expected behavior. If you visit any custom domain directly with only the root path (‘/’), it will redirect to the base domain.