🕓 10 minutes
How to assign your own DNS for the application in order to simplify the access to this application for the end user.
- Created Environment
- Created application and application components
- Have a registered domain and certificates.
By default, CodeNOW assigns a domain name that consists of the application name plus the name of the environment. If you would like to change this name, you need to register a new domain, add it to CodeNOW and then assign it to the chosen application.
A CNAME (Canonical Name) record maps a specific domain, such as "example.com" or "www.example.com", to a canonical domain name. In this case, the canonical domain name is the [myapp].codenow.com domain name of your CodeNow application. Once created, the CNAME creates an alias for the [myapp].codenow.com. The CNAME entry will resolve to the IP address of your [myapp].codenow.com service automatically, so if the IP address of the cloud service changes, you do not have to take any action.
- To learn more about the CNAME or Canonical Name record, see: https://ns1.com/resources/cname
To register a new domain name, you can check this tutorial to follow as an example: https://uk.godaddy.com/help/add-a-cname-record-19236
CodeNOW gives you two ways of how to add a new domain into the CodeNOW environment.
- Find a "Domains" option in the "Infrastructure & Security" section of the left menu bar and click on the "Add Domain" button.
- Here, you need to specify a name for your new domain as well as a public certificate and private key.
- When you are done, click the "Confirm" button.
- Find a "Domains" option in the "Infrastructure & Security" section of the left menu bar and click on the "My Domains" button.
- There you can see all the created domains.
- To add a new domain, click on the "Add Domain" button.
- Continue with STEP 1.
To assign a domain to the application, go to the application details and find the "Assigned Domains" section.
- Click on the "Assign Domain" button.
- There, you need to select a domain and environment for a specific domain.
- If you don't have any domains added to the CodeNOW environment yet, go to the Add a new domain section.
- Then fill in the unique url path for every component of the application.
- Save the changes by clicking on the "Confirm" button.
In addition, you are able to edit or unassign domains by clicking on the specific buttons.
When you deploy the application, you can see the assigned domain configuration and/or edit the configuration by clicking on the related buttons in the "Assigned Domain" section.
- If you did everything right, you can see your domain name, after you open your deployed application in the browser window.
You might be interested in our other tutorials: