DNS Configuration, Management, and Security Guide

Welcome to the Server.IT DNS guide, your ally in navigating the world of the Domain Name System with confidence. Through this guide, you will discover how the various types of DNS records impact the management of your domain and how to configure them to optimize your online presence.

rappresentazione di server dedicati

DNS Guide - Server.IT

rappresentazione di server dedicati
Important note: this guide is dedicated to adding and modifying DNS zones for domains that do not have an associated plan or service. For domains that are part of a Server.IT plan, a working set of DNS is already provided, so no modifications are necessary.

To manage domains included in a plan, we invite you to consult the specific guides for cPanel or Plesk.

Introduction to DNS

DNS, short for Domain Name System, forms one of the cornerstones of the entire Internet. This essential system acts like a kind of phonebook for the Internet, allowing the translation of website names, easily remembered by humans (e.g., www.example.com), into numerical IP addresses (like 192.0.2.1) that machines use to uniquely identify devices on the network and communicate with each other. Without DNS, we would be forced to browse the web by remembering and typing complex numerical sequences, making the online experience extremely difficult and unintuitive. Thanks to DNS, we can easily access websites, send emails, and perform many other online activities using simple and memorable domain names.

The functioning of DNS can be likened to looking up a phone number in a directory. When you enter a domain name (e.g., www.example.com) in your browser, the DNS system begins a search to find the IP address corresponding to that name. This process takes place through a series of steps:

  • DNS Request: Your computer sends a request to the DNS server configured by your Internet Service Provider (ISP) (as described in the Client Panel Guide), asking for the IP address associated with the domain name you entered.
  • Recursive Lookup: If the ISP's DNS server doesn't already have this information in its cache, it will make requests to various DNS servers in a hierarchical sequence: from the root servers to the Top-Level Domain (TLD, like .com, .net, .org) servers, and finally to the authoritative DNS servers for the specific domain requested.
  • Resolution and Response: Once the IP address is obtained from the authoritative DNS server of the domain, the ISP's DNS server will send this information back to your computer.
  • Connection: With the IP address now known, your browser can establish a connection with the web server hosting the site you want to visit, allowing you to view the webpage.

This process, though it may seem complex, happens in fractions of a second, thanks to the efficiency of the distributed DNS structure and the ability to cache information to speed up subsequent requests.

Description and Function of the A Record

A Records are one of the fundamental elements in the DNS system, serving as a bridge between human-readable domain names and the IP addresses that uniquely identify resources on the Internet. The term A stands for Address, and these records are used to map domain names to corresponding version 4 IP addresses (IPv4). When a user tries to access a website by entering a URL in their browser, the domain name resolution process consults the A Records to determine the IP address of the server hosting the site. This mechanism allows the user's browser to establish a connection with the web server, enabling the delivery of the requested webpage.

How and When to Configure an A Record

Configuring an A Record is a crucial step in ensuring that your website is accessible to users via its domain name. Below is a step-by-step guide on how and when to set up an A Record:

  • When to configure: An A Record should be configured immediately after purchasing a domain name and obtaining hosting for your website. Before configuring the record, make sure you have the IP address of the hosting server where your site is or will be hosted.
  • How to configure:
    1. Log in to the Server.it Panel. Most registrars offer a control panel through which you can manage the DNS settings of your domain.
    2. Find the DNS Management Section: Look for an option called DNS Management, DNS Settings, or something similar.
    3. Add an A Record: There should be an option to Add a new record or Edit record. Select A as the record type.
    4. Enter the A Record Details: In the name field, enter the domain name or a subdomain. In the IP address field, enter the IP address of your hosting server. Depending on the provider, you may also need to specify a TTL (Time To Live), which indicates how long the record should be cached by DNS resolvers before being updated.
    5. Save Changes: Make sure to save or confirm the changes to update the DNS records.

Once the A Record is configured, it may take anywhere from a few minutes to several hours for the changes to propagate across the global DNS system. After propagation, your website should be accessible to users via the domain name.

Correctly configuring A Records is crucial for your website's online presence. By ensuring that these records are properly set up, you will guarantee that your site is reliably reachable by users worldwide.

Description and Function of the CNAME Record

CNAME Records (Canonical Name Records) play a crucial role in the domain name system (DNS), allowing an alias to be assigned to a domain or subdomain, directing it to another domain name. The term CNAME stands for Canonical Name, which indicates the canonical or official name for a domain alias. These records are particularly useful when you want to associate multiple services (such as email, FTP, or a blog) with a single IP address without having to create multiple A records for each service. In practice, a CNAME record allows you to redirect traffic destined for one domain to another domain, making it easier to manage IP address changes or unify web services under a single domain.

2. Differences Between A and CNAME Records and Configuration Guidelines

A and CNAME records are both used in DNS, but they have specific purposes and uses that differentiate them:

  • A Record: Maps a domain name directly to an IPv4 address, linking the domain to a physical server. If the server's IP address changes, each related A record must be manually updated.
  • CNAME Record: Does not map directly to an IP address but instead points to an alias for a canonical domain name. This means that if the destination domain of the CNAME record changes its IP address, no changes are required to the CNAME record itself.

When to Use an A Record vs. a CNAME Record:

  • Use an A Record when you need to associate a domain with a specific IP address.
  • Use a CNAME Record to redirect multiple subdomains to a primary domain or when you want to simplify the management of IP address changes by delegating the primary domain to handle those changes.

Configuration Guidelines:

  • To configure an A Record, Log in to the Server.it Panel in the domain section, find the option to add a new record, select A as the record type, and enter the target server's IP address.
  • To configure a CNAME Record, the process is similar, but you will need to select CNAME as the record type and provide the canonical domain name (e.g., example.domain.com) to which the alias should point, instead of an IP address.

The choice between A and CNAME records depends on the specific configuration needs and the flexibility required in managing the domain. CNAME records offer greater agility in complex or rapidly changing scenarios, while A records provide a direct and reliable solution for linking to servers.

Description and Function of the MX Record

MX Records, short for Mail Exchange Records, are essential for correctly directing email to your domain. These DNS records specify the mail server responsible for accepting email messages sent to your domain, ensuring that emails reach their destination without issues. Without properly configured MX records, any email sent to your domain might not be delivered or could be bounced, compromising business communication.

A key aspect of MX records is their priority, which determines the order in which mail servers attempt to deliver emails. A lower number indicates higher priority, allowing you to specify a primary server and multiple backup servers, thus ensuring the resilience and reliability of your mail service.

Guide to Configuring MX Records

Configuring MX records requires attention to detail to ensure that your email is handled correctly. Here is a step-by-step guide for configuration:

  • Determine the Mail Servers: Before configuring the MX records, you need to know the addresses of the mail servers that will handle your email. This information is usually provided by your hosting or email service provider.
  • Access the DNS Management Panel: Log in to the control panel of your domain registrar or the DNS management panel, where you can modify the DNS settings for your domain.
  • Add/Modify MX Records: Look for the option to add or modify MX records. You will need to enter the mail server address and specify a priority for each server.
    • Host Name: Typically, this field is left blank or "@" is entered to indicate the main domain.
    • Mail Server Address: Enter the address of the mail server (e.g., mail.yourdomain.com).
    • Priority: Assign a number indicating the server's priority. Lower numbers have higher priority.
  • Save the Changes: After entering all the MX records with their respective priorities, save the changes. DNS changes can take anywhere from a few hours to 48 hours to propagate.

It is important to correctly configure MX records not only to ensure email reception but also to implement security measures like SPF and DKIM, which help protect your domain from spam and phishing.

Careful configuration of MX records is crucial for any online business. By following these steps and working with your hosting or email provider, you can ensure that your email communications are secure, reliable, and always available.

Description and Function of the TXT Record

TXT Records (Text Records) are a versatile type of DNS record that can contain almost any information in text format. One of the most common uses of TXT records is domain ownership verification. This practice is often required by third-party services like Google Workspace, Microsoft Office 365, and various online security services, which use TXT records to confirm that you are the legitimate manager of the domain.

In addition to domain ownership verification, TXT records are widely used for a range of security configurations and domain policies, including:

  • SPF (Sender Policy Framework): Used to prevent email address spoofing by specifying which servers are authorized to send emails on behalf of your domain.
  • DKIM (DomainKeys Identified Mail): Provides a digital signature to outgoing emails that can be verified by the recipient to confirm that the email has not been altered.
  • DMARC (Domain-based Message Authentication, Reporting & Conformance): A security protocol that helps protect the domain from abuse in phishing and spoofing attacks by combining and enhancing SPF and DKIM policies.

Examples of TXT Record Configurations

The configuration of a TXT record depends on the specifics of the service that requires its implementation. Below are some common examples of TXT record configurations:

SPF Configuration to Prevent Email Spoofing:

An example of a TXT record for setting up SPF might be:

        Type: TXT
        Name: @
        Value: v=spf1 +a +mx ~all
        TTL: 3600
        

DKIM Implementation to Digitally Sign Emails:

The DKIM configuration varies greatly depending on the email service provider, but generally, you will have a TXT record similar to this:

        Type: TXT
        Name: google._domainkey
        Value: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD3fSSCQn....
        TTL: 3600
        

To configure a TXT record, you will need to access the Server.IT DNS management panel and go to the dedicated section as described in the Client Panel Guide. From there, you can add a new TXT record by entering the required values, which include the name (often your domain or a specific subdomain), the value (the text string provided by the service you're configuring), and, in some cases, a specific TTL (Time To Live).

The flexibility of TXT records makes them powerful tools for enhancing the security and manageability of domains, allowing the implementation of complex policies through simple text configurations.

Description and Function of the TXT Record

TXT Records (Text Records) are a versatile type of DNS record that can contain almost any information in text format. One of the most common uses of TXT records is domain ownership verification. This practice is often required by third-party services like Google Workspace, Microsoft Office 365, and various online security services, which use TXT records to confirm that you are the legitimate manager of the domain.

In addition to domain ownership verification, TXT records are widely used for a range of security configurations and domain policies, including:

  • SPF (Sender Policy Framework): Used to prevent email address spoofing by specifying which servers are authorized to send emails on behalf of your domain.
  • DKIM (DomainKeys Identified Mail): Provides a digital signature to outgoing emails that can be verified by the recipient to confirm that the email has not been altered.
  • DMARC (Domain-based Message Authentication, Reporting & Conformance): A security protocol that helps protect the domain from abuse in phishing and spoofing attacks by combining and enhancing SPF and DKIM policies.

Examples of TXT Record Configurations

The configuration of a TXT record depends on the specifics of the service that requires its implementation. Below are some common examples of TXT record configurations:

SPF Configuration to Prevent Email Spoofing:

An example of a TXT record for setting up SPF might be:

        Type: TXT
        Name: @
        Value: v=spf1 +a +mx ~all
        TTL: 3600
        

DKIM Implementation to Digitally Sign Emails:

The DKIM configuration varies greatly depending on the email service provider, but generally, you will have a TXT record similar to this:

        Type: TXT
        Name: google._domainkey
        Value: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD3fSSCQn....
        TTL: 3600
        

To configure a TXT record, you will need to access the Server.IT DNS management panel and go to the dedicated section as described in the Client Panel Guide. From there, you can add a new TXT record by entering the required values, which include the name (often your domain or a specific subdomain), the value (the text string provided by the service you're configuring), and, in some cases, a specific TTL (Time To Live).

The flexibility of TXT records makes them powerful tools for enhancing the security and manageability of domains, allowing the implementation of complex policies through simple text configurations.

Description and Function of the DNAME Record

DNAME Records (Delegation Name Records) offer a powerful and flexible solution for domain management in the DNS system. Similar to CNAME records, DNAME records allow the redirection of an entire subdomain of a domain to another domain. The fundamental difference between DNAME and CNAME lies in their scope of application: while a CNAME record applies only to a specific subdomain, a DNAME record redirects all existing and future subdomains of the specified domain.

Use cases for DNAME records include:

  • Website and domain restructuring: When a company or organization decides to change the domain name but wants to keep old URLs accessible.
  • Centralized management of multiple subdomains: Facilitates the management of a large number of subdomains by redirecting them all to a new domain.

Practical Guidelines for Configuration

Configuring a DNAME record must be done carefully, as incorrect settings can significantly impact all affected subdomains. Here's how to proceed with proper configuration:

  • Planning: Before configuring a DNAME record, make sure you fully understand which subdomains will be affected and what impact this change will have on navigation and existing services.
  • Access the DNS Management Panel: Configuration starts by accessing the DNS control panel at your registrar or hosting provider.
  • Add the DNAME Record: Look for the option to add a new DNS record and select DNAME as the record type.
  • Fill in the DNAME Record Details: You will need to specify the subdomain you want to redirect and the target domain. For example, if you want to redirect all subdomains of example1.com to example2.com, you will enter:
    • Name: The subdomain prefix to redirect, e.g., *.example1.com.
    • Target: The destination domain, e.g., example2.com.
  • Save and Propagate: After entering the required details, save the record. As with other DNS records, changes may take from a few hours to up to 48 hours to propagate.

Important: While DNAME records can be extremely useful for redirecting domains at the DNS level, they should be used with caution. Improper use can cause navigation issues or negatively affect SEO. Always make sure to test changes in a controlled environment before applying them to production.

DNAME records are an advanced tool for network administrators looking to optimize the management of their DNS domains. With proper planning and configuration, they can greatly simplify domain-level redirection management while ensuring that users can seamlessly access web services and content.

Description and Function of the NS Record

NS Records (Name Server Records) play a crucial role in the Domain Name System (DNS), indicating which DNS servers are authorized to respond for a domain. These records ensure that requests directed to a particular domain are routed to the specified DNS servers, facilitating the resolution of domain names into IP addresses.

Typical use cases for NS records include:

  • Delegation of subdomains: Using NS records, you can delegate the management of a subdomain to a different set of DNS servers, allowing granular control and independent management of various sections of your domain.
  • Transition between hosting providers: When changing hosting providers or transferring a domain to a new registrar, the NS records must be updated to reflect the DNS servers of the new service provider.

Practical Guidelines for Configuration

Properly configuring NS records is essential to ensure that your domain is accessible and functional. Follow these guidelines for effective configuration:

  • Identify your provider's DNS servers: Before proceeding, you need to know the addresses of the DNS servers provided by your domain registrar or hosting provider. This information is usually provided at the time of domain registration or when purchasing the hosting package.
  • Access the domain control panel: Log in to the Server.it Panel, where you can manage your domain's DNS settings.
  • Locate the NS record management section: Look for the option dedicated to DNS or NS record management. In some panels, this section may be labeled as "DNS Settings" or "Name Server Management."
  • Enter the NS records: Add or modify the NS records to reflect the DNS server addresses of your provider. Typically, you will be provided with at least two DNS server addresses for redundancy and reliability reasons.
  • Save the changes: After entering or updating the NS records, make sure to save the changes. The propagation of NS record changes can take anywhere from a few hours to 48 hours, during which your site may not be immediately accessible from all parts of the world.

It is important to note that while NS records are essential for directing DNS traffic, incorrect configuration can lead to downtime or accessibility issues for your website. Be sure to carefully follow your provider's instructions and verify the correct propagation of NS records after any changes.

NS records represent the backbone of the DNS system, ensuring that requests to your domain are efficiently handled. Proper configuration and management of these records are crucial for the success and stability of your online presence.

Didn't find the solution you were looking for?

Contact one of our sales representatives

Specify what you are looking for, your budget, and activation times, and one of our technicians will respond to you very quickly with all the requested information.

Contact Us Now!