---
title: DNS
description: Each Droplet&#39;s network configuration contains the IP addresses of DNS resolvers that the Droplet uses to locate and connect to hostnames on the …
product: Reference
url: https://docs.digitalocean.com/reference/api/metadata/dns/
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# DNS

Generated on 17 Nov 2026

Each Droplet's network configuration contains the IP addresses of DNS resolvers that the Droplet uses to locate and connect to hostnames on the internet.

Base URL `http://169.254.169.254`

## Endpoints

- **GET** [Get DNS Attributes Index](#getDns)
- **GET** [Get DNS Nameservers](#getDnsNameservers)

## GET Get DNS Attributes Index

`/metadata/v1/dns/`

An index of DNS attributes.

##### Request: `/metadata/v1/dns/`

### cURL

```bash
curl -X GET \
  "http://169.254.169.254/metadata/v1/dns/"
```

#### Responses

200

Success

##### Response

```
nameservers
```

* * *

## GET Get DNS Nameservers

`/metadata/v1/dns/nameservers`

The nameserver entries that are added to a Droplet's `/etc/resolv.conf` file during creation.

##### Request: `/metadata/v1/dns/nameservers`

### cURL

```bash
curl -X GET \
  "http://169.254.169.254/metadata/v1/dns/nameservers"
```

#### Responses

200

Success

##### Response

```
2001:4860:4860::8844
2001:4860:4860::8888
8.8.8.8
```

* * *