Vercel Domain Verification Not Working? Here's the Real Fix — Plus How to Migrate MongoDB Atlas Between Organizations
By Pradata Tech · May 2026 · 8 min read
We recently took over a live production app from a developer who had set everything up under their own accounts — database, hosting, domain. The client had no ownership of anything. Moving it all over meant solving two problems back to back: Vercel domain verification kept failing even after we added the TXT record, and we needed to migrate the production MongoDB Atlas cluster to the client's own organization without losing data. Here's exactly what we did.
Part 1: Why Vercel Domain Verification Fails (Even After You Add the TXT Record)
The problem
When you add a custom domain to a Vercel project, Vercel asks you to add a TXT record to prove you own the domain. You add it. You wait. Vercel keeps saying "Domain verification failed."
The most common reason this happens — especially on a domain that was previously managed by another developer — is that there is already a _vercel TXT record sitting in your DNS from the old Vercel project. Vercel finds multiple tokens and cannot confirm which account owns the domain, so verification fails silently.
ℹ Note
_vercel.yourdomain.com → vc-domain-verify=abc123. If the old developer's token is still there alongside your new one, Vercel cannot resolve the conflict and will keep failing.Step 1 — Check what's already in your DNS
Before touching anything, check whether an old _vercel TXT record already exists:
# Mac / Linux
dig TXT _vercel.yourdomain.com
# Windows
nslookup -type=TXT _vercel.yourdomain.comYou can also paste your domain into MXToolbox TXT Lookup or dnschecker.org — no terminal needed. If you see a vc-domain-verify=... value that does not match what Vercel is showing you, that is your problem.
Step 2 — Delete the old TXT record
Log into whichever DNS provider manages the domain — Namecheap, GoDaddy, Cloudflare, Google Domains, etc. Navigate to DNS settings and find the record:
Delete it.
⚠ Watch out
Step 3 — Add Vercel's new TXT record
Copy the exact value from your Vercel dashboard (Settings → Domains). Add a new TXT record:
Step 4 — Wait for propagation, then re-verify
DNS changes are not instant. Depending on the old TTL setting on the deleted record, propagation can take anywhere from a few minutes to a few hours. Use dnschecker.org to watch the new TXT record appear globally before clicking "Verify" in Vercel again — otherwise you are just retrying against a cached version of the old record.
Step 5 — Add the routing records
Once verified, Vercel will ask for the actual routing records so traffic reaches your deployment. Delete any old A records or CNAMEs pointing to the previous host before adding these:
# Apex domain (yourdomain.com)
Type: A
Name: @
Value: 76.76.21.21
# www subdomain
Type: CNAME
Name: www
Value: cname.vercel-dns.com✓ Pro tip
Part 2: Migrating a MongoDB Atlas Cluster Between Organizations
The production database was in the previous developer's Atlas organization. The client had no access, no cost visibility, and no control. We needed to move everything to the client's own Atlas account without losing a single document.
Your options
| Method | Downtime | Best for |
|---|---|---|
| mongodump + mongorestore | Brief maintenance window | Most apps — simple and reliable |
| Atlas Live Migration | Minimal | High-traffic apps, Atlas-to-Atlas |
| Data Federation | None | Complex, overkill for most |
For most apps, mongodump + mongorestore with a short maintenance window is the cleanest path. Here is the full sequence.
Step 1 — Create the new Atlas cluster
In the client's Atlas account, create a new project and spin up a cluster. Match or exceed the compute tier of the old cluster. Then:
- Create a database user with the readWriteAnyDatabase role
- Set the IP Access List to 0.0.0.0/0 temporarily for the migration (lock it down afterward)
- Note the new connection string — you will need it in Step 4
Step 2 — Install MongoDB Database Tools
mongodump and mongorestore are separate from the MongoDB server — you need to install MongoDB Database Tools:
# Mac (Homebrew)
brew tap mongodb/brew
brew install mongodb-database-tools
# Ubuntu / Debian
wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2004-x86_64-100.9.4.deb
sudo dpkg -i mongodb-database-tools-*.deb
# Windows — download the MSI from mongodb.com/try/download/database-toolsStep 3 — Dump the old cluster
mongodump \
--uri="mongodb+srv://olduser:oldpassword@oldcluster.mongodb.net" \
--db=your_database_name \
--out=./mongo-backupThis creates a ./mongo-backup/your_database_name/ folder with one BSON file per collection. Check that the file sizes look reasonable before moving on — an empty dump usually means a wrong connection string or insufficient permissions.
✓ Pro tip
Step 4 — Restore to the new cluster
mongorestore \
--uri="mongodb+srv://newuser:newpassword@newcluster.mongodb.net" \
--dir=./mongo-backup/your_database_name \
--db=your_database_name \
--dropThe --drop flag drops each collection in the target before restoring, which is useful if you did a test restore and need to overwrite it cleanly.
Step 5 — Verify document counts
Connect to the new cluster with MongoDB Compass or the shell and spot-check your most important collections:
use your_database_name
// Check total documents per collection
db.getCollectionNames().forEach(name => {
print(name + ": " + db[name].countDocuments())
})Compare these numbers against the same query on the old cluster. If they match, you are good.
Step 6 — Update environment variables and deploy
Update the connection string everywhere it lives:
- Your local .env file
- Vercel → Project → Settings → Environment Variables (update for Production, Preview, and Development)
- Any CI/CD pipelines or Docker configs
- Any backend services that connect to the database independently
Redeploy on Vercel, hit a few authenticated routes, confirm data is loading from the new cluster.
Step 7 — Lock down the new cluster
Now that the app is confirmed working:
- Remove the 0.0.0.0/0 IP Access List entry
- Add only the IPs that actually need access (Vercel's outbound IPs if on Pro, or your server IP)
- Rotate the database user password and update the connection string everywhere
- Delete the old backup folder from your machine once you are confident
What We Would Do First on Any Project Takeover
Taking over an app is as much infrastructure archaeology as it is development. A few things we now do on day one before writing any code:
Audit infrastructure ownership immediately
Who owns the domain registrar? The hosting? The database? The email provider? Any third-party API keys? Map it all out. If any of those answers is "the previous developer" — that is the first thing to fix, not the code.
Do a full DNS audit before touching anything
Old DNS records pile up over time. A record pointing to a dead server, a TXT record from a previous Vercel project, a CNAME left from an old marketing tool. Run dig or use MXToolbox on the domain before adding a single record.
Do a test restore before the maintenance window
Run mongorestore into a throwaway database first. Verify document counts match. Then run the real restore during the actual cutover window. Never do a first-time restore against production.
Change every credential after the transfer
New database password. Revoke old API keys. Transfer or regenerate email SMTP credentials. The previous developer should have zero ability to connect to anything when you are done.
Stuck in a similar situation?
We help businesses take back ownership of their own products — code, database, domain, all of it. We've done it and can do it for you.
Talk to us →
