Change hostname in "Register Host" registration command (token)

Problem:
I have configured The Foreman to use a CNAME, with the idea, that the CNAME should be used to access the admin interface.
When new hosts are registered, they are supposed to use the integrated Smart Proxy’s host name, and not the CNAME.

However, when I login to the admin interface using the CNAME as HTTP Host name, when I click on “Register Host” and then “Generate”, the Registration Command will generate a URL pointing to the HTTP Host name I was logged in (e.g. the CNAME).
Likewise, if I use another HTTP Host name to login to the admin interface, “Generate” appears to be generating a URL with whatever HTTP Host name I used to get to the admin interface.

In other words, the “Generate” function will dynamically use the HTTP Host name, the administrator used to login.

Expected outcome:
Is there a way to change Foreman’s behavior, so that the “Generate” function will statically use a fixed host name in the generated URL?

Foreman and Proxy versions:
3.11.2

Foreman and Proxy plugin versions:

Name Version
foreman-tasks 9.1.1
foreman_ansible 14.0.0
foreman_remote_execution 13.1.0
katello 4.13.1

Distribution and version:
Alma Linux 9

Other relevant data:

You could maybe try setting the foreman-proxy-registration-url as outlined in our load balancing documentation: Configuring Smart Proxies with a load balancer

However, CNAME is not really supported for registrations so it’s at your own risk.

Many thanks for the suggestion!
I tried it, and I am still getting the same behavior.

It’s the other way around - I don’t want to use the CNAME in the registration. The Foreman system kind of “forces” me to use it (when CNAME has been configured), and I’m looking for a way to not use it in the registration.

Initially, I have been using foreman-installer --certs-cname "cname.my.org" to create a CNAME.

Thanks

@lstejska I see this in our documentation which references the old bootstrap.py and subscription-manager register but not global registration:
https://docs.theforeman.org/3.12/Installing_Server/index-katello.html#configuring-hosts-to-use-an-alternate-cname-for-content-management_foreman

Is it planned to add alternate CNAME support for registration commands?