It's frustrating when DNS throws you a format error for no obvious reason.
You go to add or update a DNS record, and bam — DNS_ERROR_RECORD_FORMAT (0X000025E6). The server is basically saying "I can't make sense of what you typed." Don't waste time. Here's the fix.
Jump to the fix: delete and recreate the record
This error almost always comes from a corrupted or malformed DNS record. You can't edit your way out of it. You need to delete it and start fresh.
- Open DNS Manager on your server. Hit Windows + R, type
dnsmgmt.msc, and press Enter. - In the left pane, expand your server name, then expand Forward Lookup Zones (or Reverse Lookup Zones, depending on where the record lives).
- Navigate to the zone that contains the problematic record.
- Find the record showing the error. It might have a red X or just fail when you try to view its properties. Right-click it and select Delete. Confirm the deletion.
- After deleting, right-click in the empty space in the right pane and choose New Host (A or AAAA) — or whatever record type matches the one you just nuked (CNAME, MX, etc.).
- Enter the exact same name and IP address or target host. Double-check your typing: one stray character and you'll get the same error.
- Click OK to create the new record. You should see it appear without any error indicators.
Now force the DNS server to reload the zone. In DNS Manager, right-click the zone name and select Reload. After the reload button grays out, you're good.
Why this works
The DNS database stores records as binary data. When you create a record through the GUI, Windows writes the data in a specific format. A corruption can happen from a partial write during a crash, a bad import, or manual editing of the zone file (which you should never do). The old record is toast. Deleting it removes the corrupted binary blob. Creating a fresh one writes clean data. Reloading the zone tells the server to re-read the file and rebuild its in-memory cache. No more format error, no more headache.
Less common variations of the same issue
Sometimes the fix isn't just deleting one record. Here are three scenarios you might run into:
1. The zone itself is corrupted
If you delete the record and the error persists, the zone file (usually stored in %SystemRoot%\System32\dns\) might have corruption at the zone level. Check the DNS event log (Event Viewer > Applications and Services Logs > Microsoft > Windows > DNS-Server). Look for Event ID 409 or 501. If you see those, right-click the zone and select Unload. Then right-click again and select Reload. If that fails, export the zone to a text file, delete the zone entirely, recreate it, and import the text file.
2. A CNAME or MX record points to a hostname that doesn't exist
The error can also appear if you're trying to create a record that references a hostname that's missing a corresponding A or AAAA record. For example, you add a CNAME for mail pointing to exchange.company.com, but exchange.company.com has no A record in the zone. The server can't validate the format of the target. Fix: create the A record first, then add the CNAME or MX. Or make sure the target hostname resolves.
3. An underscore or invalid character in the name
DNS hostnames are strict: only letters, numbers, and hyphens (unless you're using SRV records, which allow underscores). If you paste in a name with a space, a period in the wrong spot, or any non-standard character, you'll get this error. Check the record name carefully. A hidden trailing space is a classic culprit. Delete the record, retype the name manually (don't copy-paste), and try again.
How to prevent this going forward
- Never manually edit DNS zone files. The temptation is real when you're in a hurry. Don't. Always use DNS Manager or PowerShell. One wrong character in a text editor and your zone is toast.
- Always validate DNS entries before you save. When creating a record, double-check the name and IP or target. A typo like 192.168.1.256 will fail with this error.
- Back up your DNS zones regularly. In DNS Manager, right-click the server and select All Tasks > Export List. This exports the zone data as a plain text file. Keep a copy somewhere safe. If corruption hits, you can restore from the export.
- Run regular DNS checks. Use
dnscmd /enumrecordsin PowerShell or theDnsServerResourceRecordcmdlets to list all records. Look for any records with odd properties or those that fail to resolve. Catch them early. - Keep your server updated. DNS server bugs are rare, but they do get patched. Apply Windows updates monthly to avoid known issues that could cause corruption.
That's it. Delete, recreate, reload. You'll be back in business in under five minutes. If you still see the error after this, check your zone file permissions and disk space — a full drive can cause write failures that corrupt records.