Table of content
For every application deployed to Code Capsules, Code Capsules provides a default domain that looks something like this:Â capsulename.xxxx.codecapsules.co.za
. If you have purchased a domain like example.com
 from a domain registrar and would like to replace it with the default Code Capsules domain, Code Capsules lets you use your own domain instead (for free).
You can find everything relating to your Capsule’s domains (including your default domain) under the “Overview” tab in the Capsule. This is also where you can add a purchased custom domain to your application.
To add a custom domain to your application on Code Capsules, click on the “Domains” tab in the Capsule hosting your application. Under “Domain Details”, you’ll see all the domains associated with your Capsule; including the default domain provided by Code Capsules.
There is also a yellow +
 button at the top right of the page for if you would like to add a new domain.
Before adding a custom domain, consider: – Your capsule may route to only one root domain. You may not add multiple root domains to your Capsule.
To add a custom domain:
+
button.example.com
. Here, “example” is the domain name, and “.com” is the TLD.Once you’ve entered your root domain, add it by clicking the Create Domain button.
After adding your custom domain on Code Capsules, you need to create an A record for the domain you’ve purchased. You’ll use the IP that was saved previously when creating the A record for your domain. You can add an A record to your purchased domain by visiting your domain registrar’s website.
Your A record table should look something like this:
Record Type | Name | IPv4 Address |
---|---|---|
A Record | @ | provided-IP-Address |
where,
provided-IP-Address
 is the IP address found previously under “A Record Route”Consult your domain registrar for specific instructions on adding A records to your domain. Keep in mind, when changing your domain’s DNS records, changes may take several hours to take effect.
Before adding a subdomain to your application hosted on Code Capsules, make sure you have already created an A record for your purchased domain that routes to an application on Code Capsules.
When adding a subdomain to your application hosted on Code Capsules, keep in mind:
To add a subdomain for your application, follow the same process detailed previously, with some changes:
domain-name.tld
, you should specify your subdomain as well, such as:Â app.example.com
.After clicking the Create Domain button, you must create a CNAME record for your purchased domain with information about the subdomain you’d like to create.
Creating CNAME records for purchased domains vary for different domain registrars. Consult your domain registrar for information on creating CNAME records.
In general, the CNAME record table for your domain should look something like this:
Record Type | Name | Host/Target |
---|---|---|
CNAME | subdomain |
your-root-domain |
where,
subdomain
 is the subdomain you would like to create (e.g. app
, www
)your-root-domain
 is your root domain that contains an A record routing to your application on Code Capsules.As with adding an A record, CNAME records or any other changes to your domain’s DNS records may take several hours to take effect.
If you would like to remove any domains or subdomains associated with your Capsule, navigate to the “Overview” tab in your Capsule. Under Domains, you will see a list of all the domains that are associated with your Capsule.
Next to each custom domain and subdomain, you’ll find a trash can icon. Click the trash can icon to remove the custom domain or subdomain.
Note, removing a custom domain or subdomain does not affect your domain’s DNS records:
Here is a list of defined terms and concepts used throughout this article. Divided into three sections, here you’ll find definitions for: structures related to URLs, DNS records, and information related to HTTP.
www.example.com
 is the URL. A URL is a combination of three different aspects of a domain: A subdomain, a second-level domain, and a top-level domain.www
. Subdomains provide users with a consistent naming strategy to access service you may provide (for example, hr.myapplication.com
 may route users to your business’ human resources portal)..de
 TLD lets users know the website probably caters to a German audience.example.com
 is an example of a root domain, whereas www.example.com
 is not a root domain.example.com
 to an IP addresses (e.g. 123.456.567.8
)example.com
, and the subdomains info
 and 123
 were not created for example.com
, both info.example.com
 and 123.example.com
 would route to example.com
.mail.example.com
 may route to mail.google.com
. CNAME records are unlike A records, which route to a specific IP address.Table of content