Connecting Custom Domain
More often than not, you would like to connect your custom domain to your Cosmocloud App Service. Custom domain allows you to showcase your applications on your own brand domains.
Cosmocloud Deploy allows to deploy any types of service on the platform, so you can deploy both Frontend (client-facing) and Backend (API systems) on the platform, and then connect your applications to your custom branding such as -
example.com- top level domainsub.example.com- sub domain
You might also want to deploy multiple services (like microservices) to different subdomains and endpoint prefixes such as -
backend.example.com- single backendapis.example.com/auth- authentication microserviceapis.example.com/invoices- invoices microservice
How to connect your Custom Domain?
You can do this from the Cosmocloud Console by -
Go to App Services and open the App Service you want to connect the custom domain to.
Navigate to the Networking tab.
For the environment you want to connect to custome domain (for ex production), click the 3 dot menu button and chose Configure DNS.
Step 1 — Add you custom domain and endpoint, which can be any of the following format -
example.comexample.com/prefix-endpointsub.example.comsub.example.com/prefix-endpoint
Step 2 — Depending on your choice of format above, you would be asked to make changes to your DNS Hosting to add an A record or CNAME record or both. Once you are done adding this to your DNS management service, proceed to Step 3.
Step 3 — Cosmocloud Deploy platform checks if you have correctly added your DNS records in Step 2. Once verified, it automatically connects and redeploys your service on that environment.
Once connected successfully, you can then access your service on your custom domain endpoint.
Connecting SSL to your configured custom domain
You may (almost always) want to add SSL certificate to add HTTPS security to your custom domain and your applications. To connect a SSL certificate to your App Service custom domain, please follow the following steps -
Go to App Services and open the App Service you want to connect the SSL Certificate to.
Navigate to the Networking tab.
For the environment you want to connect your SSL certificate (for ex production), click the 3 dot menu button and chose SSL Certificate.
Note: If you can't find the SSL Certificate option in the 3 dot menu, you might not have connected a custom domain to your App Service environment.
Fill the Add SSL certificate form -
Certificate chain: This it the public key of your SSL certificate.
Certificate private key: This is the private key of your SSL certificate.
Click Add SSL Certificate button.
Generate SSL Certificate for your app
While you can use any service / provider to generate an SSL certificate for your app, or you might already have one, we cannot use any service which does not expose the Public/Private key parts of the certificate (such as AWS ACM).
We currently prefer you use Certbot to generate your SSL certificate.
Steps to manually issue an SSL certificate with DNS Validation -
You can also use other methods to create your SSL certificate the way you want, using Certbot.
Last updated