Synology DNS Server: How to change name of zone/domain?

I have a Synology 418+ that I use for ISCSI, NFS, SMB sharing primary along as a Backup device. I also leverage some of the Apps within DSM one of which being DNS Server. It’s pretty basic from a setup perspective using the GUI. Awhile back I created two master domains with forward/reverse lookups. One called “local” and the other “localdomain”, I know what you thinking…why? Good question and it was due to default domains names that I never went back and changed. Now I have decided to change what I have so I can leverage what was already built. The following domains had the configuration as:

  1. local ( = general computers i.e. desktop, laptop, etc.
  2. localdomain ( = lab servers

I decided to do what I should have done long ago and change the domains to something more relevant. I didn’t want to recreate what I had but there is no way I know of to just rename them. So what I did was to export the ones I want to change, edit them and reimport back. Once I know this worked then I would delete the old ones I didn’t want any longer.

Export existing DNS zones

  1. Login to Synology DSM
  2. Open DNS Server
  1. Click on the zone you want to export. For reverse lookup you can edit these int he GUI so you don’t need to export unless you want to in case you have allot.
  2. Click the above tab “Export Zone”
    1. This will create a ZIP file called “zonefile”

Edit exported zone

  1. Go to the directory where you downloaded the ZIP files.
  2. Using you favorite editor edit the following files and change the old domain to new. In my example I am changing “local” to “home”
$ ls -l
 total 5720
 -rw-r-----@ 1 andy  staff  1945 Dec 25 09:31

$ ls
 zone.conf       zonefile/local

$ vi zone.conf       
# In vi use the example: ":g/local/s//home/g" to make a global change.

 $ORIGIN local.
 $TTL 86400
 local. IN SOA ns.local. mail.local. (
 vsphere.local.  86400   A
 esxivm2.local.  86400   A
 esxivm1.local.  86400   A
 centos.local.   86400   A
 vcenter.local.  86400   A
 local.  NS      ns.local.
 ns.local.       A 


# This will change it to:
 $ORIGIN home.
 $TTL 86400
 home. IN SOA ns.home. mail.home. (
 vsphere.home.   86400   A
 esxivm2.home.   86400   A
 esxivm1.home.   86400   A
 centos.home.    86400   A
 vcenter.home.   86400   A
 home.   NS      ns.home.
 ns.home.        A 

# Save it and edit the "" reverse lookup file in the same way if this was exported.

$ vi

# Save it and edit the "zone.conf" file in the same way.

$ vi zone.conf

# Now we need to create a ZIP package
$ zip zone.conf zonefile
$ ls -l
 -rw-r-----  1 andy  staff  1053 Dec 24 12:37 

# Thats all the files , now we will import them back

Importing modified zones

  1. Go back to your browser for Synology DSM
  2. Go to you DNS Server App
  3. Click on Create -> Import Zone
  1. Since we exported the entire zone we are going to import it as such: “Complete zone settings” and “Browse” for file to import.
  1. If everything was correct you will get something similar to:

Thats it, easy peasey!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.