vercel dns
The vercel dns command manages DNS records for domains: list, inspect, add, update, remove, and import records.
vercel dns lsUsing the vercel dns command to list all DNS records
under the current scope.
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 rm [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 ls. The default value is 20 and the maximum is 100.
vercel dns ls --limit 100Using 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.
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.
Use the --format option with inspect to specify the output format. json is the only supported format.
vercel dns inspect rec_1a2b3c4d5e6f --format jsonUsing the vercel dns inspect command with the
--format option.
The following global options can be passed when using the vercel dns command:
--cwd--debug--global-config--help--local-config--no-color--non-interactive--scope--team--token--version
For more information on global options and their usage, refer to the options section.
Was this helpful?