| name | vercel-dns |
| description | Manage DNS records for domains hosted on Vercel using the Vercel CLI |
| license | MIT |
| compatibility | opencode |
| metadata | {"service":"vercel","category":"infrastructure"} |
What I Do
Manage DNS records for domains hosted on Vercel, including:
- List existing DNS records
- Add new DNS records (A, AAAA, CNAME, TXT, MX, etc.)
- Remove DNS records
- Switch between Vercel teams/accounts
Prerequisites
- Vercel CLI installed:
npm i -g vercel or brew install vercel-cli
- Logged in:
vercel login
- Domain must be on Vercel nameservers or have Vercel as DNS provider
0 Finance Project
For the 0 Finance project, always use --scope prologe:
vercel dns ls 0.finance --scope prologe
vercel logs www.0.finance --scope prologe
Common Commands
Check Login & Team
vercel whoami
vercel teams ls
vercel switch <team-slug>
vercel domains ls --scope prologe
List Domains & Records
vercel domains ls --scope prologe
vercel dns ls <domain> --scope prologe
Add DNS Records
vercel dns add <domain> <subdomain> A <ip-address>
vercel dns add <domain> <subdomain> CNAME <target>
vercel dns add <domain> <subdomain> TXT '<value>'
vercel dns add <domain> <subdomain> MX <mail-server> <priority>
vercel dns add <domain> '' TXT '<value>'
vercel dns add <domain> @ MX mail.example.com 10
Remove DNS Records
vercel dns ls <domain>
vercel dns rm <record-id>
vercel dns rm <record-id> --yes
Examples
Add Email DNS Records (MX + SPF)
vercel dns add example.com '' MX inbound-smtp.us-east-1.amazonaws.com 10
vercel dns add example.com inbound MX inbound-smtp.us-east-1.amazonaws.com 10
vercel dns add example.com '' TXT 'v=spf1 include:amazonses.com ~all'
Add DKIM Records for Email Authentication
vercel dns add example.com selector._domainkey CNAME selector.dkim.provider.com
Add Domain Verification TXT Record
vercel dns add example.com _amazonses TXT 'verification-token-here'
vercel dns add example.com '' TXT 'google-site-verification=token'
Subdomain Setup
vercel dns add example.com api CNAME api.service.com
vercel dns add example.com app A 192.0.2.1
Troubleshooting
"You don't have permission to list the domain record"
The domain is in a different team. List teams and switch:
vercel teams ls
vercel switch <correct-team-slug>
Domain Not Listed
- Domain might be in a different team/account
- Domain might not have Vercel as nameservers
- Check with
vercel domains ls
Record Not Propagating
- DNS propagation can take up to 48 hours (usually 5-30 minutes)
- Check propagation:
dig +short <record-name> <record-type> or use dnschecker.org
- Verify record was added:
vercel dns ls <domain>
Token Saving Tips
Fast Verification With dig
When a third-party UI says "Looking for DNS records", verify what the public internet sees:
dig +short TXT resend._domainkey.example.com
dig +short TXT send.example.com
dig +short MX send.example.com
dig +short TXT example.com
Tips
- Always check which team you're in before making changes
- Use single quotes around TXT values to preserve special characters
- For apex/root domain records, use empty string
'' as subdomain
- Record IDs are shown in
vercel dns ls output - needed for removal
- Some records (like those added by Vercel automatically) cannot be removed