close
Skip to content
Docs

vercel dns

The vercel dns command manages DNS records for domains: list, inspect, add, update, remove, and import records.

When adding DNS records, please wait up to 24 hours for new records to propagate.

terminal
vercel dns ls

Using the vercel dns command to list all DNS records under the current scope.

terminal
vercel dns add [domain] [subdomain] [A || AAAA || ALIAS || CNAME || TXT] [value]

Using the vercel dns command to add an A record for a subdomain.

terminal
vercel dns add [domain] '@' MX [record-value] [priority]

Using the vercel dns command to add an MX record for a domain.

terminal
vercel dns add [domain] [name] SRV [priority] [weight] [port] [target]

Using the vercel dns command to add an SRV record for a domain.

terminal
vercel dns add [domain] [name] CAA '[flags] [tag] "[value]"'

Using the vercel dns command to add a CAA record for a domain.

terminal
vercel dns update [record-id] --name [name] --type [type] --value [value] --ttl [seconds]

Using the vercel dns command to update fields of an existing DNS record in place, using its ID.

terminal
vercel dns update [record-id] --mx-priority [priority]

Using the vercel dns command to update the priority of an MX record.

terminal
vercel dns update [record-id] --srv-priority [priority] --srv-weight [weight] --srv-port [port] --srv-target [target]

Using the vercel dns command to update an SRV record. All four --srv- options must be provided together.

terminal
vercel dns update [record-id] --comment "[comment]"

Using the vercel dns command to update the comment that describes what a DNS record is for.

terminal
vercel dns inspect [record-id]

Using the vercel dns command to show a single DNS record in full using its ID.

terminal
vercel dns rm [record-id]

Using the vercel dns command to remove a record for a domain.

terminal
vercel dns import [domain] [path-to-zonefile]

Using the vercel dns command to import a zonefile for a domain.

These are options that only apply to the vercel dns command.

The --limit option can be used to specify the maximum number of dns records returned when using ls. The default value is 20 and the maximum is 100.

terminal
vercel dns ls --limit 100

Using the vercel dns ls command with the --limit option.

Use the --name option with update to set a new name for the DNS record. Using '@' as the name refers to the domain itself.

terminal
vercel dns update rec_1a2b3c4d5e6f --name api

Using the vercel dns update command with the --name option.

Use the --type option with update to set a new type for the DNS record. Valid types are A, AAAA, ALIAS, CAA, CNAME, MX, SRV, and TXT.

terminal
vercel dns update rec_1a2b3c4d5e6f --type CNAME

Using the vercel dns update command with the --type option.

Use the --value option with update to set a new value for the DNS record.

terminal
vercel dns update rec_1a2b3c4d5e6f --value 198.51.100.100

Using the vercel dns update command with the --value option.

Use the --ttl option with update to set a new Time to Live (TTL) for the DNS record, in seconds.

terminal
vercel dns update rec_1a2b3c4d5e6f --ttl 300

Using the vercel dns update command with the --ttl option.

Use the --mx-priority option with update to set a new priority for an MX record.

terminal
vercel dns update rec_1a2b3c4d5e6f --mx-priority 10

Using the vercel dns update command with the --mx-priority option.

Use the --srv-priority, --srv-weight, --srv-port, and --srv-target options with update to set new values for an SRV record. All four options must be provided together.

terminal
vercel dns update rec_1a2b3c4d5e6f --srv-priority 10 --srv-weight 0 --srv-port 389 --srv-target example.com

Using the vercel dns update command with the --srv-priority, --srv-weight, --srv-port, and --srv-target options.

Use the --comment option with update to add context on what the DNS record is for.

terminal
vercel dns update rec_1a2b3c4d5e6f --comment "used for the marketing site"

Using the vercel dns update command with the --comment option.

Use the --format option with inspect to specify the output format. json is the only supported format.

terminal
vercel dns inspect rec_1a2b3c4d5e6f --format json

Using the vercel dns inspect command with the --format option.

The following global options can be passed when using the vercel dns command:

For more information on global options and their usage, refer to the options section.

Last updated July 15, 2026

Was this helpful?

supported.