aaPanel DNS Validation Failed — Correct NS & A Record Setup (Step-by-Step)
If aaPanel shows a message like:
Validate NameServer Failed: NS records are not correctly set. NS A records do not point to server IP
you’re dealing with a DNS mismatch problem, not a server crash or aaPanel bug.
This guide explains why it happens, what aaPanel is checking, and exactly how to fix it.
—
✅ Quick Answer (Featured Snippet Optimized)
aaPanel DNS validation fails when nameservers exist but their A records do not point to your server’s IP address.
Fix it by creating proper ns1 / ns2 A records that point to your VPS IP and ensuring your domain’s nameservers match them.
—
❓ What aaPanel DNS Validation Actually Checks
aaPanel does not just check your website A record.
It checks three things:
Your domain has nameservers (NS records)
Those nameservers exist as hostnames (ns1.domain.com, ns2.domain.com)
Each nameserver hostname has an A record pointing to your VPS IP
If any one of these fails, aaPanel shows DNS Validation Failed.
—
🔍 The Most Common Causes (90% of Cases)
Nameservers are set, but ns1 / ns2 have no A records
ns1 / ns2 A records point to the wrong IP
Domain uses external DNS (Cloudflare) but aaPanel DNS is also enabled
Mixed DNS management (registrar + aaPanel)
DNS propagation not finished yet
—
🛠️ FIX 1: Correct Setup for aaPanel Built-In DNS (Recommended)
If you want aaPanel to manage DNS, follow this exact structure.
—
Step 1 — Decide: aaPanel DNS OR External DNS
If you use aaPanel DNS:
⚠️ If you use Cloudflare → do NOT use aaPanel DNS
—
Step 2 — Set Nameservers at Your Registrar
At your domain registrar, set:
$$
ns1.yourdomain.com
ns2.yourdomain.com
$$
Save changes.
—
Step 3 — Create A Records for Nameservers (CRITICAL)
Inside aaPanel → DNS Manager, add:
| Host | Type | Value (IP) |
| ns1 | A | YOUR_VPS_IP |
| ns2 | A | YOUR_VPS_IP |
👉 This is the step most people miss.
—
Step 4 — Add Website A Records
Also ensure these exist:
| Host | Type | Value |
| @ | A | YOUR_VPS_IP |
| www | A | YOUR_VPS_IP |
TTL can be 300 or Auto.
—
Step 5 — Wait for DNS Propagation
DNS changes can take:
After propagation, aaPanel validation will pass.
—
🛠️ FIX 2: If You’re Using Cloudflare (Very Common)
If nameservers point to Cloudflare, aaPanel DNS validation will always fail — and that’s OK.
Correct setup:
Nameservers → Cloudflare
DNS records → Cloudflare
aaPanel DNS → NOT used
👉 Ignore aaPanel DNS validation in this case.
—
🧪 How to Verify the Fix
From your VPS or local machine, run:
$$
nslookup ns1.yourdomain.com
nslookup yourdomain.com
$$
Both should return your VPS IP.
If they do → DNS is correct ✅
—
⚠️ Common Mistakes to Avoid
❌ Setting nameservers but not creating ns1/ns2 A records
❌ Mixing Cloudflare + aaPanel DNS
❌ Pointing ns records to IPs directly (wrong)
❌ Expecting instant validation (DNS needs time)
—
📌 Example of a CORRECT aaPanel DNS Setup
$$
Domain: example.com
NS:
ns1.example.com
ns2.example.com
A:
example.com → 37.xxx.xxx.xxx
www → 37.xxx.xxx.xxx
ns1 → 37.xxx.xxx.xxx
ns2 → 37.xxx.xxx.xxx
$$
This setup will pass aaPanel validation.
—
🧠 When You Should NOT Use aaPanel DNS
If you use Cloudflare CDN
If your registrar provides advanced DNS
If you manage DNS elsewhere already
In those cases, aaPanel DNS is optional.
—
💬 Your Turn
Still failing validation?
Which registrar are you using?
Are you using Cloudflare?
What IP is your VPS using?
Post your setup (no sensitive data) and we’ll fix it together 👇
—
📌 Related Fixes You May Need
—
#aapanel #dns #vps #hosting #serveradmin