# Adding a server with FQDN and resolvers via Data Plane API

**URL:** <https://discourse.haproxy.org/t/adding-a-server-with-fqdn-and-resolvers-via-data-plane-api/12173>\
**Category:** Help!\
**Created:** [May 7, 2026, 2:28pm UTC](https://discourse.haproxy.org/t/adding-a-server-with-fqdn-and-resolvers-via-data-plane-api/12173 "2026-05-07T14:28:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ema-pe](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@ema-pe](https://discourse.haproxy.org/u/ema-pe)\
**Post date:** [May 7, 2026, 2:28pm UTC](https://discourse.haproxy.org/t/adding-a-server-with-fqdn-and-resolvers-via-data-plane-api/12173/1 "2026-05-07T14:28:48Z")

</div>

Hi, I have a question regarding the usage of some Data Plane API APIs that wrap the Runtime API. I’m using HAProxy 3.2.6.

I specified a `resolvers` section in my HAProxy configuration similarly to the [following example](https://www.haproxy.com/documentation/haproxy-runtime-api/reference/set-server/#change-a-server%E2%80%99s-fqdn), along with an empty backend section:

```auto
resolvers mydns
  nameserver dns1 192.168.50.30:53
  accepted_payload_size 8192

backend webservers

```

I would like to add a new server to the backend section by specifying only the FQDN and linking that server to the configured resolvers section. In a normal HAProxy configuration, I would add something like this and restart the service:

```auto
backend webservers
  server s1 s1.example.com:8080 check resolvers mydns

```

However, I want to use the Runtime API through the Data Plane API, since I do not know the servers in advance.

If I understood correctly, this is not possible with the `add server` ([doc here](https://www.haproxy.com/documentation/haproxy-runtime-api/reference/add-server/)) and `set server` ([doc here](https://www.haproxy.com/documentation/haproxy-runtime-api/reference/set-server/#change-a-server%E2%80%99s-fqdn)) Runtime API commands. I see that `set server` can update an existing server, but in principle, how can I add a new server with an FQDN linked to a resolver if `add server` does not seem to support an `fqdn` parameter or a way to reference a `resolvers` section?

The mapped commands in the Data Plane API are: `POST /services/haproxy/runtime/backends/{parent_name}/servers` ([doc here](https://www.haproxy.com/documentation/dataplaneapi/community/?v=v3#post-/services/haproxy/runtime/backends/-parent_name-/servers)), and `PUT /services/haproxy/runtime/backends/{parent_name}/servers/{name}` ([doc here](https://www.haproxy.com/documentation/dataplaneapi/community/?v=v3#put-/services/haproxy/runtime/backends/-parent_name-/servers/-name-)). It does not seem possible to pass the FQDN and resolvers instead of the IP address of a new server.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![ema-pe](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@ema-pe](https://discourse.haproxy.org/u/ema-pe)\
**Post date:** [May 7, 2026, 2:53pm UTC](https://discourse.haproxy.org/t/adding-a-server-with-fqdn-and-resolvers-via-data-plane-api/12173/2 "2026-05-07T14:53:33Z")

</div>

Quoting the reference manual about `add server` ([link here](https://www.haproxy.com/documentation/haproxy-configuration-manual/new/latest/management/#section-9.3.-add-server)):

> Currently a dynamic server is statically initialized with the `none` init-addr method. This means that no resolution will be undertaken if a FQDN is specified as an address, even if the server creation will be validated.

And for `set server <backend>/<server> fqdn <FQDN>` ([link here](https://www.haproxy.com/documentation/haproxy-configuration-manual/new/latest/management/#section-9.3.-set-server)):

> Change a server’s FQDN to the value passed in argument. This requires the internal run-time DNS resolver to be configured and enabled for this server.

So this seems to confirm that `add server` does not support FQDN resolution, while `set server` supports it only for servers that already exist. Is this correct?
