How to set up your domain with Synology DNS Server
With Synology's DNS Server package, you can turn your Synology DiskStation into a private domain name server, allowing you to provide domain name resolution services and maintain complete control of your domain's DNS records. DNS Server is a useful tool for organizations hosting their own websites or for individuals interested in learning more about DNS. Whether for professional, educational, or recreational purposes, Synology's DNS Server makes setting up a private domain name server quick and convenient.
In this article, we'll look at the basics of Synology's DNS Server and walk through the steps of creating a zone and resource records for an example domain name.
The Domain Name System (DNS) is like a phone book that helps computers navigate the Internet and other networks. If you've used the Internet, then you've definitely used the Domain Name System. Whenever you visit a website by entering its domain name into a web browser (e.g., www.synology.com), your web browser queries one or more DNS servers in order to find the corresponding IP address of the website you wish to visit (e.g. 126.96.36.199). This process is called domain name resolution.
If you have a registered domain name and host servers for web, FTP, or mail services, then you'll probably want guests to be able to access your services using your domain name, instead of going through the hassle of remembering a bunch of long IP addresses. In this case, you'll need DNS service to help guest devices translate your domain name into the corresponding IP address of your servers. One solution is to establish your own domain name server.
This is where Synology's DNS Server package comes in handy. With DNS Server, your Synology NAS can serve as a private domain name server. It provides easy-to-use options to create multiple zones, manage resource records, provide domain name resolution, and do much more. The DNS Server package lets you build a fast and independent DNS server solution, maintain your DNS records, and ensure your network infrastructure remains under your control.
Before setting up DNS Server, please see the following requirements:
- Install DNS Server: To install and run Synology's DNS Server package, simply log into DSM and visit Package Center.
- Obtain a fixed, public IP address: To set up public DNS service, you need to acquire a fixed IP address for your Synology NAS. For more information, please contact your Internet service provider.
- Register a domain name: Setting up authoritative DNS service requires registering a domain name with a domain name provider. For example, if you want to use a domain called "example.com," you need to register the domain example with the domain provider of .com domain names. For a list of registrar web sites you can use to register your domain name, go to ICANN.org. After your registrar notifies you that your domain name is successfully registered, you can create a master zone for the domain on Synology DNS Server.
- Check firewall or port forwarding settings: DNS services require the use of TCP and UDP port 53. If your Synology NAS uses a firewall, this port must be opened. If the NAS connects to the Internet through a router, set up port forwarding rules and open TCP and UDP port 53.
- Register your device: Remember to register the IP address and other required information of your Synology NAS with the provider of your domain name. Otherwise, clients will be unable to query your Synology NAS over the Internet. Consult your domain name provider for more information. Depending on the settings for your domain name provider's servers, your changes to DNS resolvers can take effect about after 48 hours or more.
- Change router settings: If you are going to set up your DNS server for your local network, you have to change the DNS server settings on your router or your client device so that your DNS server can be queried. For more information, please consult the manual of your router or client device.
Once you've installed DNS Server and your environment meets the requirements above, you'll need to configure some settings before providing DNS service for your domain. First, we'll start by creating a master zone.
A master zone stores name information regarding one or more DNS domains. The master zone serves as the authoritative source for information regarding each DNS domain name included in the zone. In the sections below, we'll take a look at creating a master zone for our domain name "synoproduct.com."
- Open DNS Server and go to the Zones tab.
- Click the Create button and select Master zone.
- Edit the following settings:
- Domain type: Select Forward Zone to perform resolution services from domain name to IP address.
- Domain name: Enter your registered domain name. In this example, we'll use a domain name "synoproduct.com."
- Master DNS server: Enter the public, fixed IP address that your ISP assigned to you. Guests will be directed to this IP address when querying your DNS Server for the domain name entered above. In this example, we'll enter the IP address 188.8.131.52.
- Serial format: Choose a format for the serial number of zone records. There are two formats: Integer (0~4294967295) or date (YYYYMMDDNN, i.e. 2015043001).
When you create a master zone, DNS Server will automatically create three resource records: a Name Server (NS) record; a Host (A) resource record; and a Start of Authority (SOA) record. The NS and A resource records can be viewed on the Edit Resource Record screen, as in the example below.
In this example, the NS resource record identifies the domain name server that you give to your registrar or your DNS service so that queries can be routed to your Synology NAS. The A resource record maps a domain name to an IP address. In the example above, DNS Server will resolve queries for "ns.synoproduct.com" to "184.108.40.206."
Depending on your needs, you might want to add more resource records to the master zone. In this example, we'll create a CNAME resource record so guests will be redirected to "www.synoproduct.com" when querying "ns.synoproduct.com."
- Select your zone, click Edit, and select Resource Record.
- On the Edit Resource Records window, click Create to add a new resource record.
- In this example, we'll create a CNAME resource record.
- Enter the following details:
- Name: Enter a name for the resource record.
- TTL: Choose how long the resource record remains in the cache of other domain name servers.
- Canonical name: Enter the host into which the name entered above should translate. In the example below, we want visitors to be redirected to "ns.synoproduct.com" when they query "www.synoproduct.com," so we'll enter "ns.synoproduct.com" in this field.