Custom Domain

Given below are the steps to create your custom domain using AWS CloudFront or Azure Application Gateway.

Preparations

  1. 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.

    a. Go to your design console, Xooa.com/blockchain, and choose the application for which you want to create custom domain.

    Preparations

    b. Click Design to open the application’s design console -> Publish -> click Modify on the Custom Domain and Email tile -> Copy the URL.

    Preparations
  2. Decide the custom domain name.

Setting up custom domain on AWS

Prerequisites

The following are mandatory requirements to start creating the domain:

  1. User must have AWS account.

  2. User must have registered custom domain.

  3. Request AWS certificate.

How to create custom domain

Step 1: Go to https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html to create Hosted Zones.

If the customer has an existing registered domain with a domain name service provider other than AWS then, following steps must be performed after the AWS CloudFront instance is created as mentioned in step 2 below:

a) A subdomain entry must be added in the current domain name service provider DNS to point to AWS cloud front instance URL

b) The subdomain must be added as ‘Alternate domain name (CNAME) - optional’ in the AWS cloud front instance.

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.
    AWSDomainSetup

  • Scroll down to Cache key and origin requests section.

    • Legacy cache settings -> None.

    • Object caching -> Customize -> set Maximum TTL and Default TTL to 0.
      AWSDomainSetup

  • Click Create distribution. The page navigates to the Distributions home page.

Step 2: In the distributions page, click Origins tab -> Create origin.
AWSDomainSetup

Step 3: In the Settings page:

  • In the Origin domain field, select: dashboardapi.Xooa.com.

  • In the Origin path field, enter: /blockchain.

  • Click Create Origin.

AWSDomainSetup

Step 4: In the distributions page, go to Behaviors tab -> Create behavior.

AWSDomainSetup

Step 5: In the Settings page.

  • In the Path pattern field, enter: /api/config.

  • In the origin and origin groups field, select: dashboardapi.Xooa.com.

AWSDomainSetup

  • Scroll to Legacy cache settings.

    • Headers -> select Include the following headers -> select ‘Origin’ and ‘Referer’.

AWSDomainSetup

  • Object caching -> Customize -> set Maximum TTL and Default TTL to 0.
  • Click Create Behavior.

Step 6: In the distributions page, click the Edit button to point your custom domain.

  • In the Alternate domain name field, enter your custom domain name. Refer below screenshot.

AWSDomainSetup

  • In the Custom SSL certificate field, in the dropdown, select your certificate to associate. If you cannot find your certificate, request certificate using ACM.

AWSDomainSetup

  • Click Save changes.

Step 7: Go to Route 53 -> Hosted Zones -> click your domain name in the hosted zone -> Create record. Refer below screenshot.

AWSDomainSetup

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 below screenshot.

AWSDomainSetup

  • 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 below screenshot.

AWSDomainSetup

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.

AWSDomainSetup

Setting up custom domain on Azure

Prerequisites

The following are mandatory requirements to start creating the domain:

  1. User must have Azure account.

  2. User must have registered custom domain.

How to create custom domain

Step 1: Navigate to Azure Application gateway service and click on create.

  • Select resource group, region and enter a name for your application gateway.

  • For Tier, select Standard V2. Choose “No” for Enable autoscaling parameter.

  • Set Instance count to 1. Further select Virtual Network and Subnet
    Preparations

  • Click on Next

Step 2: On the Frontend configuration page,

  • Select Frontend IP address type as Public.
  • For Public IP address parameter, select a public IP (if available) else create a new one.
    Preparations
  • Click Next

Step 3: On the Backend configuration page,

  • Click on Add a backend pool. Give a name to your backend pool.
  • Keep target type as IP address or FQDN. Paste the non-custom domain URL that you copied at step 1 in Preparations, in the Target field.
    Preparations

  • Add this pool and click Next

Step 4: On the Configuration page,

  • Click on Add a routing rule. Give a rule name and set Priority to 1.
  • Under listener configuration, enter listener name. Keep Frontend IP to Public.
  • For Protocol, choose HTTPS and configure certificate related settings.
  • (Optional) Under Additional settings, you can also configure an error page URL as per your requirement.
  • Click on Backend targets section. Target type will be Backend pool and select the backend pool which we configured in Step3 above.
  • For Backend settings, click on Add new. Give name, and select HTTPS as the backend protocol.
  • For Use well known CA certificate, choose No. Select the option to create a new certificate. Download the “.cer” file from below link and upload the same under the CER certificate parameter.
    Azure CER certificate
  • Keep default settings for parameters under Additional settings
  • Under the hostname section, select Yes for Override with the new host name. Click on Override with the specific domain name and paste the non-custom domain URL that you copied as step 1 in Preparations, in the Host name field.
  • For Create custom probes, choose No, and click on Add.
  • Click on Add to add the configured routing rule
    Preparations
  • Click Next

Step 5: (Optional) Add tags if required and click Next. Review your settings and then click on Create.

Step 6: Navigate to Azure DNS Zones service and add a record in your zone. Choose yes for the Alias record set and select Alias type as Azure resource. From the Azure resource dropdown parameter, choose the public IP which we used above in step2.

Step 7: Go to your application console -> click Modify on the Custom Domain tile.

Step 8: In the popup window, enter the domain name -> click Save. Refer below screenshot.
Preparations

Step 9: 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.
Preparations