Skip to main content

A Records

How to map a domain name to a static IP address?

Your A records need to be mapped to a static IP address in your DNS. There are two ways find your load balancer's static IP address:

Option 1: Using AWS Console

  1. Open the Amazon Elastic Compute Cloud (Amazon EC2) console.
  2. Navigate to the relevant region.
  3. Under Load Balancing, choose Load Balancers from the navigation pane.
  4. Select the load balancer that you're finding the IP addresses for.
  5. On the Description tab, copy the Name.
  6. Under Network & Security, choose Network Interfaces from the navigation pane.
  7. Paste the load balancer name that you copied in step 5 in the search box. The filtered results show all elastic network interfaces associated with the load balancer.
  8. For each of the elastic network interfaces in the filtered results, copy the Public IPv4 address value.
  9. This is the list of addresses to which your inbound connections will map.
info

Alternatively, you can watch this video to see the above steps in action.

Option 2: Using command line

You can nslookup your load balancer's name.

nslookup <loadbalancer-name>

Example:

nslookup a81f96a18760848d5a8a43346282f9f7-xxxx.elb.us-east-2.amazonaws.com

Example output:

Server:         1.1.1.1
Address: 1.1.1.1#53

Non-authoritative answer:
Name: a81f96a18760848d5a8a43346282f9f7-xxxx.elb.us-east-2.amazonaws.com
Address: 18.1.2.3
Name: a81f96a18760848d5a8a43346282f9f7-xxxx.elb.us-east-2.amazonaws.com
Address: 3.139.3.192
Name: a81f96a18760848d5a8a43346282f9f7-xxxx.elb.us-east-2.amazonaws.com
Address: 1.222.2.244

The 3 addresses in the output are the IPs that you're looking for.