In this codelab, we will add a custom domain name and deploy a Let's Encrypt SSL certificate.
Tip: If you do not have a domain to test with, get a free domain name from Freenom.
In the Amezmo application window, select the Domains tab. Click Add domain.
Enter the domain name that will point to this application instance. My application's domain name is mywebapp.jhanley.com.
Notice the red exclamation mark. We assigned a domain name to the application but we have not created a DNS resource record for this domain name. Click on the domain name.
Notice the IP address specified in the dialog. Proceed to the next step in this codelab.
Notice the IP address specified in the dialog. Open a new browser window to log into your domain's DNS server to create the required DNS server reource record.
You can create either an A or CNAME resource record at your DNS server. Since A resource records resolve faster than CNAMES, I use custom DNS A resource record at the DNS server.
Log into your domain's NDS server administrator console and create a new custom resource record. The exact steps are specific to your DNS server provider.
Example dialog for creating an A resource record with Google Cloud DNS.
Example dialog for creating an A resource record with Office 365.
Proceed to the next step which validates the new DNS resource record.
Once the DNS resource record is saved, wait about ten minutes before continuing. This allows the DNS server to create the resource record, and replicate to your domain's other DNS servers (there are typically two to four servers). If you are impatient and proceed too quickly, the DNS server might return an NXDOMAIN error. You will then have to wait a much longer time as DNS servers cache NXDOMAIN responses which are Negative Answers. For technical details read RFC 2308 Section 5: Caching Negative Answers.
Return to the Amezmo interface. Refresh the page. Amezmo periodically checks for domain validation. If the domain is not validated, click Validate domain. If the domain has validated, proceed to the next screenshot.
Once the domain is validated, a screen similar to below will display.
If the DNS resource record was created correctly and was replicated to all of the domain's DNS servers, the validation should succeed.
Notice that once the domain validates, Amezmo automatically creates and deploys an SSL certificate for the domain name. Amezmo interfaces with the Certificate Authority Let's Encrypt.
Our domain's SSL certificate will auto-renew.
Using the domain name, launch a web browser and verify that you can view the test application over HTTPS. Amezmo application instances support both HTTP and HTTPS, but we will enable automatic redirection.
Tip: Browsers such as Chrome will automatically redirect to HTTPS for eTLDs and gTLDs such as .dev (and about 45 other TLDs). To verify that HTTP works, you will need to use a tool such as curl.
Your application instance is now available via two URLs. The domain name and Amezmo's internal domain name. In this step, we will disable the Amezmo internal domain so that access is only via your domain's URL.
Click on the Domains tab. Under the Internal domain section, click the green slider button to disable the Internal domain.
Your application instance is currently accessible via the HTTP and HTTPS protocols. In this step, we will enable HTTP redirects to HTTPS.
In the Amezmo application window, select the Domains tab. Under Domain names, click on your application DOMAIN. A new window appears with details on your domain. Near the bottom under Always use HTTPS, click the green slider button to enable redirects to HTTPS.
Application instances support more than one domain name. For example, I could configure additional domain names such as www.jhanley.com. Just repeat the steps above to setup each domain name. An SSL certificate will be issued for each validated domain name.
In this article, we set up a domain name, created a DNS server resource record, deployed an SSL certificate, disabled the Internal domain, and enabled HTTP to HTTPS redirection. Amezmo provides an excellent interface to benefit from these features.