One A record pointing to multiple IPs

Dear ,

How can i point one record(A record) point to multiple IP’s. For example i have two IP’s and need to point A record, if one IP is down second IP need to serve. Please let me know the possibilities.

This is load balancing, this is something either you should manage yourself or rent from cloudflare as an extra service.

If your domain is at Cloudflare, then at Cloudflare dashboard you can create another A record which you point to a different IP address. And make sure to be :orange: (proxied) :slight_smile:

As @jnperamo replied, in that case you would need another IP address provided by your hosting provider and added to your host/origi network configuration to make it work.

It would look like this example below:

You have to add each record - two entries for your domain - as a separate A records.

Regarding the Load Balaner, see below for more information:

Thanks for update, yes we are also checking LB in clodflare. But if i purchase a LB for domain ex:- xyz.com. Lb will applicable for sub domains(1.xyz.com,2.xyz.com) or not.

I am not sure for your intention and use case, but:

  1. you can have two or more IP addresses at one host/origin (configured at your network interface) which serves the same content for one or more domains/websites
  • in which case, if the server goes down, both IP addresses would be unavailable …
  1. you can combine multiple origins (servers) which have different IP addreses to a Cloudflare Load balancer (a setup of having multiple origins in a single “pool”)
  • which is a better approach and how it should be

Do you mean for A or CNAME records?

The “pool” can contain the IP addresses or hostnames of your origin servers.

To use a Cloudflare Load balancer as stated:

Prerequisites
Access to Load Balancing: Load Balancing requires one of the following:
A Cloudflare Enterprise plan with Load Balancing enabled.
An existing Free, Pro, or Business plan with a Load Balancing subscription.
Load balancer hostname: The hostname for which the Cloudflare Load Balancer will manage traffic. The default hostname is the root hostname.
Origin servers (2): This walkthrough requires at least two origin servers (origin-server-1 and origin-server-2, for example).
Location: This walkthrough configures only a single geographic region.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.