Custom Domains
By default, Launch generates a unique URL of the form example.contentstackapps.com for every environment. Each environment is assigned to a unique subdomain at contentstackapps.com.
To make your site easy to access and remember, you need a human-friendly domain name. Contentstack Launch allows you to add custom domains to your environment. Follow the steps below to configure your custom domain.
Note: Custom subdomains must not exceed 63 characters. For example, www.example.com, www.example.org, subdomain.example.in
Adding Apex Domains with Redirects
Contentstack Launch supports redirection-only services for apex domains, following industry best practices. Rather than serving traffic directly from the apex domain (e.g., example.com), many top websites redirect users to a subdomain like www.example.com.
This approach offers several key advantages:
- Improved Security: Segregating content delivery and domain management helps reduce the attack surface and enhances overall security.
- Enhanced Flexibility: Easily switch infrastructure or hosting setups without impacting the user-facing subdomain.
- Consistent User Experience: Delivering content via a subdomain ensures better structure, brand consistency, and trust.
- Improved Performance: Subdomains support CNAMEs, enabling CDNs to route traffic across multiple geolocations for faster content delivery.
- Better Cookie Handling: Cookies set on the apex domain apply to all subdomains, which can pose a security risk in multi-tenant systems. Redirecting helps isolate this behavior.
- SEO Benefits: Redirecting to a single subdomain helps avoid duplicate content issues, supporting cleaner SEO practices.
In this setup, Launch ensures that all content is exclusively served from the designated subdomain, providing users with a seamless and efficient hosting solution for their websites. To configure apex domain redirection to the subdomain, please contact the Launch support team.
Add a Custom Subdomain
Launch lets you add custom subdomains to your environments for more flexible domain management.
Follow the steps below to add a custom subdomain to an existing domain. In this example, we will configure a subdomain for example.com.
- Click the project card to open your project from the Launch landing page.
- In the Environments screen, click an existing environment or create a new environment. We will add a custom domain to the Default environment for this tutorial.
- In the Default environment, click the ellipses under Actions and then click Settings to go to the Settings page.
- In Environments under Settings, click Domains.
- Click the + New Domain button.
- In the Domain Name field, enter the subdomain name in the following format: <name>.<apex domain>
For example: www.example.com, domain.example.com
After entering the subdomain name, the DNS Details section gets auto-populated as shown below:The Value field displays the default subdomain.
Note: The DNS details are different for the apex domain and the custom subdomain.
- Click the copy icon next to the Name and Value fields to copy the CNAME record details.
- Paste the copied CNAME record details to your domain provider platform.
Below are some documentation links to common DNS providers for adding the CNAME record: - Click the Create Custom Domain button.
You can see the newly created subdomain listed in the Domains page.