How to Bind Custom Domain via A Record

The majority of applications in production use an External IP address (instead of the Shared Load Balancer, provided by default) as more secure and effective entry point. So, to attach a custom domain for such environments, a special A Record is required.

A Record is an entry in your DNS zone file, that maps each domain name to IP address. For example, when you type www.mycustomsite.com, browser goes to the nameserver and asks for the mycustomsite.com A Record. This record should point to the appropriate IP address of your web or balancing server.

Tip: Using A Record presupposes you already have an environment with Public IP address attached to its entry point. If not, add it to continue or consider another way of domain name binding - by means of CNAME redirect.

1. Log into your domain registrar account (as an example, we use GoDaddy). Expand Sign In option at the top and click the same-named button.

sign in to godaddy

2. Fill in your GoDaddy credentials to authenticate and switch to your account manager by clicking the Visit My Account button.

my account at godaddy

3. Expand your DOMAINS list, find the required one and click on Manage DNS for it.

manage dns

Tip: In case you don’t have any domain yet, follow the Get one now link to purchase it.

get domain name

4. At the bottom of the Records section, click the Add button.

dns records management

5. Within the shown Add Zone Record frame, select the A option from the Type drop-down list.

add a record

6. Complete the A Record addition.

configure a record

Here:
  • Host - enter hostname the A Record is linked to - in our case, just type @ to point record directly to your domain name
  • Points to - specify external IP address of your environment entry point

    Tip: To get this IP, expand your application server (load balancer) layer and use Additionally button to see your node Public IP address (the second one).

    check Public IP address

  • TTL - select for how long the DNS server should keep your A Record information cached (i.e. the delay before new settings for it will be applied in case of their further change)

Click Save.

Note: Any DNS changes you make can take up to 48 hours to be reflected throughout the Internet.

7. That's all! Now, open a new browser tab and enter your custom domain name to the address bar.

custom domain for application

You'll see the home page of your application, which means that everything is setup properly.