I have a few zones in my Windows Server DNS.
I wish to add around 50 unique aliases to the existing zone. Is there any trick I can use? I've tried to google for it where the odd post suggests using dnscmd
.. but I'm not sure if this is right and if so, how AND what the file format should be.
Assume that all the aliases are in a file.
eg.
test10 Alias(CNAME) www.foo.com
of course, I can wire up the file into any format and columns, required.
If the records are already in a file, your best bet may be to edit the existing zone file directly (usually in the
%SystemDir%\System32\dns
folder). Open the file for the zone in question and paste the records in at the bottom of the file. Ensure the record format is the same as existing records (for example, it's simplyCNAME
rather thanAlias(CNAME)
and the fully-qualified alias name (on the right) should have a period at the end to designate it as a fully-qualified domain name.Once your edits are complete, load the DNS control panel, find the domain, right-click and select
Reload
to have it read the file back into memory with the changes.Note: Don't forget to make a backup of the original file before you begin editing, and don't forget to increment the serial number so any secondary servers will know to pull a zone transfer. This assumes the zone was set up to use a file (standard) rather than some other data source for its zone information.
The
DNSCMD
tool can be used to add records to a zone programmatically through a batch file if needed, but for 50 records in one zone it's probably easier to just paste them in directly rather than trying to convert it to a batch file.