A custom domain can be created in multiple ways such as configuring CloudFront Nginx proxy, or Cloudflare. CloudFront configuration, our recommended approach, has been explained in detail here.
Prerequisites
The following are mandatory requirements to start creating the domain:
- Xooa app must be deployed
- The user must have an AWS account
- User must have registered custom domain
Preparations
- Obtain the non-custom domain app by creating the App on Xooa Marketplace. The app’s non-custom domain must be obtained when deploying and noted down. The URL can be copied from the tip under the custom domain field in publish.
- Go to your design console, com/blockchain, and choose the application for which you want to create a custom domain.
- Click to open the application-->click Modify on the Custom Domain and Email tile-->Copy the URL.
2. Decide the custom domain name
How to create a custom domain
Step 1: Go to https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html to create Hosted Zones.
Step 2: Go to Create distribution page in CloudFront
- Paste the non-custom domain URL that you copied as step 1 in Preparations, in the Origin domain field
- Scroll down to Cache key and origin requests section
- Legacy cache settings-->None
- Object caching-->Customize-->set Maximum TTL and Default TTL to 0.
-
- Click Create distribution. The page navigates to the Distributions home page.
Step 2: On the distributions page, click the Origins tab-->Create origin
Step 3: On the Settings page:
- In the Origin domain field, select: Xooa.com
- In the Origin path field, enter: /blockchain
- Click Create Origin
Step 4: In the distributions page, go to the Behaviors tab-->Create behavior
Step 5: On the Settings page
- In the Path pattern field, enter: /api/config*
- In the origin and origin groups field, select: Xooa.com
- Scroll to Legacy cache settings
- Headers-->select Include the following headersàselect ‘Origin’ and ‘Referer’
- Object caching-->Customize-->set Maximum TTL and Default TTL to 0.
- Click Create Behavior
Step 6: On the distributions page, click the Edit button to point to your custom domain.
- In the Alternate domain name field, enter your custom domain name. Refer to the below screenshot.
- In the Custom SSL certificate field, in the dropdown, select your certificate to associate. If you cannot find your certificate, request a certificate using ACM.
- Click Save changes.
Step 7: Go to Route 53-->Hosted Zones-->click your domain name in the hosted zone-->Create record. Refer to the below screenshot.
Step 8: In the Quick create record page
- Enable Alias
- Select your distribution endpoint in Route traffic to drop-down list
- Select your distribution. Refer to the below screenshot.
- Click Create records. The custom log domain is created.
Step 9: In a new browser tab, enter the custom log domain name-->copy the domain name from the URL field
Step 10: Go to your application console-->click Modify on Custom Domain tile
Step 11: In the popup window, enter the domain name-->click Save. Refer to the below screenshot.
Step 12: Go back to the newly opened tab with your domain name and reload the page.
Your application will be available in the newly created custom domain name.