vercel dns
The vercel dns command manages DNS records for domains: list, inspect, add, update, remove, and import records.
vercel dns listUsing the vercel dns command to list all DNS records
under the current scope.
vercel dns list [domain]Using the vercel dns command to list the DNS records
of a single domain.
vercel dns add [domain] [subdomain] [A || AAAA || ALIAS || CNAME || TXT] [value]Using the vercel dns command to add an A record for a
subdomain.
vercel dns add [domain] '@' MX [record-value] [priority]Using the vercel dns command to add an MX record for
a domain.
vercel dns add [domain] [name] SRV [priority] [weight] [port] [target]Using the vercel dns command to add an SRV record for
a domain.
vercel dns add [domain] [name] CAA '[flags] [tag] "[value]"'Using the vercel dns command to add a CAA record for
a domain.
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.
vercel dns update [record-id] --mx-priority [priority]Using the vercel dns command to update the priority
of an MX record.
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.
vercel dns update [record-id] --comment "[comment]"Using the vercel dns command to update the comment
that describes what a DNS record is for.
vercel dns inspect [record-id]Using the vercel dns command to show a single DNS
record in full using its ID.
vercel dns remove [record-id]Using the vercel dns command to remove a record for a
domain.
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 list with a domain argument. The default value is 20 and the maximum is 100.
vercel dns list example.com --limit 100Using the vercel dns list command with the
--limit option.
Use the --next option with list to show the next page of results. When there are more results, the command prints the cursor to pass:
vercel dns list example.com --next 1584722256178Using the vercel dns list command with the
--next 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.
vercel dns update rec_1a2b3c4d5e6f --name apiUsing 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.
vercel dns update rec_1a2b3c4d5e6f --type CNAMEUsing the vercel dns update command with the
--type option.
Use the --value option with update to set a new value for the DNS record.
vercel dns update rec_1a2b3c4d5e6f --value 198.51.100.100Using 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.
vercel dns update rec_1a2b3c4d5e6f --ttl 300Using 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.
vercel dns update rec_1a2b3c4d5e6f --mx-priority 10Using 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.
vercel dns update rec_1a2b3c4d5e6f --srv-priority 10 --srv-weight 0 --srv-port 389 --srv-target example.comUsing 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.
vercel dns update rec_1a2b3c4d5e6f --comment "used for the marketing site"Using the vercel dns update command with the
--comment option.
The remove subcommand asks you to confirm before it removes a record. Use the --yes option to skip the prompt, for example in a script:
vercel dns remove rec_1a2b3c4d5e6f --yesUsing the vercel dns remove command with the
--yes option.
The update subcommand also asks you to confirm the change. It has no option that skips the prompt, so run it in an interactive terminal.
Use the --json option with list or inspect to output the result as JSON:
vercel dns inspect rec_1a2b3c4d5e6f --jsonUsing the vercel dns inspect command with the
--json 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.
Was this helpful?