How to change cloud domain names to CNAMEs in HANA 2.x?
Note: This is mainly applicable for Native HANA scenarios with XSA.
After installing SAP HANA 2.x or upgrading from HANA 1.x to 2.x especially after the introduction of XS Advanced, SAP HANA generates multiple URLs for different applications within XSA. In HANA as you are aware of, there are 2 modes of routing available.
- Port based routing
- Hostname based routing
When you are using port-based routing, the application URLs will be pointing to different port numbers.
When you are using hostname-based routing, the application URLs will be pointing to same port number, but the domain name changes based on the application.
You will choose either one of the above options while installing SAP HANA 2.x with XSA.
Since the URLs are generated based on the cloud default domain name, the URL will have the following challenges:
- The URLs will be lengthy
- It is complex or near to impossible to remember the entire URL for both technical & business users (unless you bookmark your URLs)
- Sometimes, if you wanted to share it with business users are 3rd party users, they may find it difficult to open the URL
- It would be highly impossible to make it as an external URL and not meeting the standards, as it might expose the internal domain names which is a security threat.
In this scenario, customer wants to use the URL with their domain name, instead of the default cloud domain URL. This same is application to the On-prem URLs as well.
In case if you are using HANA clusters it is more difficult to point the URLs. With SAP HANA in System Replication mode ( will have 2 HANA servers setup as primary and secondary, will be accessed by a common URL for the end users).
In general, you will point the IP of the server to the domain in Cloud DNS/Route53 in the cloud console. Hence the HANA URLs will be generated as:
You may not be able to rename the server or change it in /etc/hosts.
HANA server picks up the domain name from the above cloud DNS settings of the cloud console.
You may point the cloud default dnsname to the domain name or CNAME of the customer.
Below are the steps:
- Install and configure SAP HANA with the cloud default Hostname
- System should be ready to setup SSL
- Copy all the possible URLs generated by the HANA server by using the command:
It will list all the app urls. ( you may get around 35 URLs)
- If it is in a cluster environment, break the sap hana cluster and do it in each individual system.
- Use the Common name ( for ex: if cname.com & dev2.cname.com , create a common name dev.cname.com and map the common name to all the URLs
- In general, the domain names are configured and mapped by the windows domain controller team. Take the help of this team to map all the 35 URLs to the common name as mentioned in step 6.
- Ensure that the cname mapping to default domainname in command prompt.
- Set that commonname (dev.cname.com) as the default domain name in xscontroller.ini
- XSA restart – restart and restage all the apps
- Restart the HANA DB server
- Execute the following commands:
xs version – to check the version
xs apps – list the xs apps
xs env xsa-cockpit – check the environment variables for xsa-cockpit
xs services – list all the xs services
xs unbind-service xsa-cockpit-uaa xsa-cockpit – unbing the xsa service
xs us xsa-cockpit xsa-cockpit-uaa –
xs bs –help
xs bs xsa-cockpit xsa-cockpit-uaa
xs restart xsa-cockpit
xs rebind-services –help
xsuaa -f – unbind and rebind the xs services forcefully
You should be able to logon with xs-admin-login using the XSA_ADMIN user. When executing the xs apps command, it should display all the URLs in the above-mentioned format.
Please provide your comments and feedback to improve this content.