# Point a domain at a load balancer

Make a name of your own reach a load balancer, with A and AAAA records for the network and public dedicated types, or a name served by an application load balancer.

How a name reaches a load balancer depends on its type. Replace _www.example.com_ with your name.

## Prerequisites

- Permission for `lb:DescribeLoadBalancers` to read the load balancer's addresses and names.
- For a name in a Deutsche Cloud hosted zone, `dns:ChangeRecords` on that zone; see
  [DNS](/docs/dns/guide/point-a-name-at-a-resource).

## `lb11`, `lb21`, `lb31` and public `dedicated`

The load balancer has an IPv4 and an IPv6 address of its own for its whole life.

**Console**
1. Open **Load balancers**, then open the load balancer.
2. Copy the **IPv4** (and the **IPv6**) from the page header.
3. In the zone of your name, add an `A` record with the IPv4 as its value, and an `AAAA` record
   with the IPv6 if you serve IPv6. In a Deutsche Cloud hosted zone, an `ALIAS` record whose target
   is the load balancer answers both addresses instead.

**CLI**
```sh
dcloud lb load-balancers get lb-id
```

The addresses are the `ipv4` and `ipv6` fields of `lb`.

**API**
```http
GET /lb/api/load-balancers/lb-id
```

The addresses are empty while the load balancer is `provisioning`. They are released when the
load balancer is deleted, and a new load balancer gets new ones.

## `application`

An application load balancer shares its addresses with other organizations' load balancers and
tells requests apart by host name. It answers only for its own names:

- its platform name, the `hostname` field (**Platform name (served at once)** on its
  **Overview** tab), over http when it has an `http` service and over https when it has an
  `https` service;
- the names of its `https` service: the `domains` you listed, or the names on the certificate you
  uploaded. Each must be in one of your hosted zones; see [Serve HTTPS](serve-https.md).

Once the `https` service has your name, point the name at the load balancer: in a Deutsche Cloud
hosted zone with an `ALIAS` record whose target is the load balancer, or anywhere with a `CNAME`
record whose value is the platform name. A request for a name the load balancer does not serve
is answered `421 Misdirected Request`.

## Private `dedicated`

A private load balancer has no public address. Clients in its VPC connect by its `hostname`,
which answers the VPC address of each of its machines serving now.

## Related

- [Serve HTTPS](serve-https.md)
- [Load balancer types](load-balancer-types.md)
- [Delete a load balancer](delete-a-load-balancer.md)
