The Domain Name System (DNS) is a distributed database that maps IP addresses to domain names so users can find resources by name rather than numerical address. Use the DNS pane of the Server app to add or remove forwarding servers, control lookups, and add, remove, or edit host names, IP addresses, and aliases.
DNS keeps a list of domain names and the IP addresses associated with each name. When a computer needs to find the IP address for a name, it sends a message to the DNS server, which is also known as a name server. The name server looks up the IP address and sends it back to the computer. If the name server doesn’t have the IP address locally, it sends messages to other name servers on the Internet until the IP address is found.
You can decide which network has access to the service. See Server access overview.
When your DNS server cannot resolve a DNS query locally, it can use a forwarding server to forward the request to another DNS server that can respond to the DNS query. This can be used across separate subnets and networks. If you’re also using DHCP service, the forwarding servers are populated in the DHCP networks.
Select DNS in the Server app sidebar.
Click Edit next to Forwarding Servers.
Click Add , then enter the forwarding server’s IP address.
You can enter multiple IP addresses.
Click OK.
The number of forwarding servers you specified is shown.
Your DNS server can perform lookups for clients on all networks or only specific networks you choose.
Select DNS in the Server app sidebar.
Click “Perform lookups for,” then click the pop-up menu, then choose “all clients” or “only some clients.”
If you choose “only some clients,” you have the following options:
Perform lookups for the server itself: Performs DNS lookups for your server.
Perform lookups for clients on the local network: Performs DNS lookups for clients on the same network your server is on.
Perform lookups for clients on the following network: Performs DNS lookups for clients on networks you specified with an IP address and subnet mask.
Click Add to enter the IP address of the server or network.
CIDR notation is supported. For more information, see the CIDR Notation article on Wikipedia.
You can create a primary zone (a canonical list of host names) or a secondary zone (a read-only copy of the primary zone).
For primary zones, you can choose to allow zone transfers (client-initiated copy of all zone records), and for secondary zones you can choose how often the secondary zone syncs to the primary zone.
Select DNS in the Server app sidebar.
Click the Action pop-up menu , then choose Show All Records.
Click Add below the Records field, then choose “Add Primary Zone” or “Add Secondary Zone.”
Configure zone settings.
For a primary zone, enter the domain name, validity period, and if you allow zone transfers.
For a secondary zone, set the data update frequency and retry rate.
Click OK.
You edit a zone by double-clicking it in the list. You remove a zone by selecting it, then clicking Remove .
Add host names and aliases to your DNS server.
For more information about DNS record types, see DNS record types.
Select DNS in the Server app sidebar.
If you don’t have the Primary Zone for the mail domain name configured, create it now.
Click the Action pop-up menu , then choose Show All Records.
Click Add below the Records field, then select the type of record you want.
Add Machine Record: Creates an A record.
Add Alias Record: Creates a CNAME record.
Add Mail Exchanger Record: Creates an MX record.
Add Nameserver Record: Creates an NS record.
Add Service Record: Creates an SRV record.
Select the zone for the record, then enter the additional settings for the record type.
Click Create.
Change host names and aliases on your DNS server.
Select DNS in the Server app sidebar.
Click the Action pop-up menu , then choose Show All Records.
Select the host name or DNS record you want to change in the Records list, then click the Action pop-up menu , then choose Edit Record.
Make changes to the DNS information for your server.
Click Done.
Remove host names and aliases from your DNS server.
Select DNS in the Server app sidebar.
Click the Action pop-up menu , then choose Show All Records.
Select the host name or DNS record you want to delete in the Host Name list, then click Remove below the list.
Configuring DNS for Mail service involves creating MX records in DNS for your mail servers. If your ISP provides DNS service, contact the ISP so they can enable your MX records. Follow these steps only if you provide your own DNS service.
You might want to set up multiple servers for redundancy. If so, create an MX record for each auxiliary server.
If you’re using the Server app to supply DNS service, create MX records in DNS for your mail servers. See the instructions at Configure DNS for Mail service.
Your ISP provides DNS service for resources outside your local network. Your ISP doesn’t provide DNS service for your local network. If you rely on your ISP for Internet DNS requests, you need to configure your network preferences with the IP address of the name server provided by your ISP. If you need to provide DNS service on your local network for your servers or client computers, you must set up your own DNS service.