# servers()

Canonical URL: https://developers.iagenify.com/sdk/ref/domains/servers/
Language: en

`api.domains.servers() → Promise<Server[]>`

What can serve a hostname on this account. The list serve() picks from — because a DNS record alone serves nothing.

Status: free · feeds serve() · per account

```javascript
const servers = await api.domains.servers();
await domain.serve({ name: "docs", pages: servers[0].name });
```

## Why this list exists {#why}

> **A record does not make a name serve**
>
> Pointing a name at a platform that has not been told about it gets you an edge refusing the connection — which reads as an outage, not as a misconfiguration. The platform must accept the name as well, and serve() does both halves together.

## What an entry carries {#what}

Its name — which is what `serve({ pages })` takes — and enough to show it in a picker. The list is the account's: another account's projects are not in it.

## For something hosted here {#hosting}

A host created with [api.hosts](/sdk/ref/hosts) attaches a domain through [host.domains.attach()](/sdk/ref/host/domains/attach) instead. This is for serving a name from something else on the account.

## An empty list {#empty}

Nothing on the account can serve a hostname yet. Writing a record by hand would produce a name that resolves and refuses — which is worse than not writing it.

- [serve()](/sdk/ref/domain/serve): Doing both halves.
- [host.domains.attach()](/sdk/ref/host/domains/attach): For a host here.

```python
servers = api.domains.servers()
domain.serve(name="docs", pages=servers[0]["name"])
```
