15%

Save 15% on All Hosting Services

Test your skills and get Discount on any hosting plan

Use code:

Skills
Get Started
10.11.2023

How to Set Up and Configure a DNS Service on AlexHost

DNS (Domain Name System) is the foundational protocol that translates human-readable domain names — such as www.example.com — into machine-readable IP addresses that servers use to route traffic across the internet. Without a properly configured DNS service, your domain is unreachable, your email fails to deliver, and your SSL certificates cannot validate.

This guide walks through the complete process of provisioning and configuring AlexHost's free DNS service, managing NS records, adding DNS zones, and understanding every record type you will encounter — including critical edge cases that most tutorials skip entirely.

What Is a DNS Service and Why Does Proper Configuration Matter

At its core, DNS operates as a distributed, hierarchical database. When a user types your domain into a browser, a recursive resolver queries a chain of authoritative name servers — starting from the root zone, then the TLD (.com, .net, .org), and finally your domain's authoritative name servers — to retrieve the correct IP address.

A misconfigured DNS record does not just slow down your site. It can cause complete service outages, break email delivery, invalidate DKIM signatures, and prevent domain control validation (DCV) for SSL Certificates. TTL values set too high mean that a single mistake can persist for hours or days across global resolvers. This is why understanding every layer of DNS configuration — not just the A record — is essential before you touch a single setting.

AlexHost's DNS service supports binding up to 10 domain names per service instance, making it practical for developers and small businesses managing multiple projects from a single control panel.

Provisioning the AlexHost Free DNS Service

Step 1: Navigate to the DNS Service Order Page

Log into your AlexHost client area and navigate to Services > Free DNS. Click Order Now, then Continue on the product selection screen.

Step 2: Accept Terms and Complete Checkout

Before proceeding to checkout, you must acknowledge and accept both the Terms of Use and the Privacy Policy. After clicking Checkout, an order confirmation is generated and the DNS service is immediately provisioned to your personal dashboard.

Step 3: Access the DNS Manager

From your dashboard, locate the newly provisioned DNS service and click DNS Manager. This is your central control panel for all zone management, record creation, and import operations.

Important: The DNS Manager requires at least one active service — typically a VPS — to associate a real IPv4 address with your DNS records. If you do not yet have a virtual server, consider provisioning a VPS Hosting plan first. Once active, your VPS will provide the IPv4 address you need to populate your A records.

Understanding DNS Record Types Before You Configure

Before adding records, you need to understand what each type does. Configuring them incorrectly is one of the most common causes of silent failures in web infrastructure.

Record TypePurposeCommon Pitfall
AMaps a hostname to an IPv4 addressForgetting to add a record for the bare domain (@) separately from www
AAAAMaps a hostname to an IPv6 addressOmitting this when your server supports dual-stack networking
CNAMEAliases one hostname to anotherNever use a CNAME on the root/apex domain — it breaks MX and NS records
MXDirects email to a mail serverPriority values must be set correctly; lower number = higher priority
TXTStores arbitrary text (SPF, DKIM, DMARC)Multiple SPF records on the same name cause validation failures
NSDelegates a zone to authoritative name serversChanging NS records at the registrar before the new servers are ready causes downtime
SOADefines authoritative info for the zoneIncorrect serial number format breaks zone transfers
SRVSpecifies service location (e.g., SIP, XMPP)Weight and priority fields are frequently swapped by operators
PTRReverse DNS — maps IP to hostnameMust be configured at the IP block owner level, not just in your zone
CAARestricts which CAs can issue SSL certsOmitting this leaves your domain open to unauthorized certificate issuance

Adding Your Domain to the DNS Manager

Step 1: Click "Add Domain"

Inside the DNS Manager, click Add Domain. Enter your fully qualified domain name and the IPv4 address of your server. This action creates the initial DNS zone for your domain and automatically populates the default NS records.

Step 2: Automatic NS Record Configuration

AlexHost pre-configures two authoritative name server records for every domain you add:

alpha.alexhost.com
beta.alexhost.com

These NS records are set automatically. You do not need to create them manually. However, you must update your domain registrar to point to these name servers — otherwise, the DNS zone you configure in AlexHost's DNS Manager will never be queried by the global resolver infrastructure.

Step 3: Update NS Records at Your Domain Registrar

This is the step most users miss, and it is the most consequential. Registering NS records at your domain registrar means instructing the TLD registry which authoritative name servers are responsible for resolving queries for your domain.

The process at your registrar:

  • Log into the registrar where your domain is registered (e.g., if you registered through Domain Registration, navigate to your domain's DNS settings)
  • Locate the Name Servers or NS Records section
  • Replace any existing name servers with:
  • alpha.alexhost.com
  • beta.alexhost.com
  • Save the changes

DNS propagation after changing NS records typically takes between 24 and 48 hours, though in practice most resolvers pick up the change within 2–4 hours. During this window, some users may still be directed to old servers. Do not delete records from your old DNS provider until propagation is confirmed globally — tools like dig, nslookup, or online DNS propagation checkers can verify this.

Zone Import Options: Manual Entry vs. AXFR vs. Zone File

AlexHost's DNS Manager offers three methods for populating DNS records in a zone:

Manual Record Entry

The most straightforward approach. Navigate to your domain inside the DNS Manager, click More, and add records individually. This is appropriate for new domains with a small number of records.

Import from a Zone File

A DNS zone file is a plain-text file formatted according to RFC 1035 that contains all resource records for a domain. If you are migrating from another provider, export the zone file from your current DNS provider and import it directly. This eliminates manual transcription errors and preserves TTL values.

Zone file snippet example:

$ORIGIN example.com.
$TTL 3600
@    IN  A      203.0.113.10
www  IN  A      203.0.113.10
mail IN  A      203.0.113.20
@    IN  MX  10 mail.example.com.
@    IN  TXT    "v=spf1 ip4:203.0.113.20 ~all"

Import via AXFR (DNS Zone Transfer)

AXFR (Authoritative Zone Transfer) is a DNS protocol mechanism defined in RFC 5936 that allows one DNS server to request a complete copy of a zone from another authoritative server. In the AlexHost DNS Manager, you can specify the hostname of your current authoritative DNS server and trigger an AXFR pull.

Critical security note: Many DNS providers disable AXFR by default or restrict it to specific source IP addresses. If the AXFR import fails, you will need to either whitelist AlexHost's resolver IPs at your current provider or fall back to a manual zone file export. Leaving AXFR open to any IP is a significant security risk — it exposes your entire zone data to reconnaissance.

Configuring Records for Common Use Cases

Pointing a Domain to a VPS

If you are running a web application on a VPS Hosting or Dedicated Server instance, your minimum required records are:

  • A record for @ (bare domain) pointing to your server's IPv4
  • A record for www pointing to the same IPv4
  • AAAA records for both if your server has an IPv6 address

Configuring Email DNS Records

Email deliverability depends on three TXT-based authentication records in addition to the MX record. Skipping any one of them will cause major email providers to reject or silently discard your messages.

  • MX record: Points to your mail server hostname (e.g., mail.example.com)
  • SPF (TXT): Declares which IP addresses are authorized to send email for your domain. Example: "v=spf1 ip4:203.0.113.20 include:_spf.alexhost.com ~all"
  • DKIM (TXT): A public key record used to verify cryptographic signatures on outgoing mail. The selector and key are generated by your mail server software
  • DMARC (TXT): Instructs receiving servers on how to handle mail that fails SPF or DKIM checks. Example: "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"

If you are using AlexHost's Email Hosting service, the required MX, SPF, and DKIM values will be provided in your email hosting control panel.

Securing Your Domain with CAA Records

A CAA (Certification Authority Authorization) record specifies which certificate authorities are permitted to issue SSL/TLS certificates for your domain. This is a frequently overlooked but important security control. If you use Let's Encrypt, your CAA record should read:

example.com.  IN  CAA  0 issue "letsencrypt.org"

Without a CAA record, any trusted CA in a browser's root store can technically issue a certificate for your domain.

TTL Strategy: Balancing Performance and Flexibility

TTL (Time to Live) is the duration, in seconds, that a resolver caches a DNS record before querying the authoritative server again. Choosing the right TTL is a tradeoff:

  • Low TTL (60–300 seconds): Faster propagation of changes. Use this when planning a migration, IP change, or failover. The downside is increased query load on your authoritative servers.
  • Standard TTL (3600 seconds / 1 hour): Appropriate for stable production environments.
  • High TTL (86400 seconds / 24 hours): Reduces resolver query volume but means any mistake takes a full day to correct globally.

Best practice: Lower your TTL to 300 seconds at least 24–48 hours before any planned infrastructure change. After the change is confirmed stable, raise it back to 3600 or higher.

DNS Configuration Checklist and Decision Matrix

Use this checklist before considering your DNS setup complete:

  • NS records at your registrar point to alpha.alexhost.com and beta.alexhost.com
  • A record exists for both the bare domain (@) and www
  • AAAA records added if your server supports IPv6
  • MX record configured if you are sending or receiving email
  • SPF, DKIM, and DMARC TXT records in place for email authentication
  • CAA record restricts certificate issuance to your chosen CA
  • TTL values reviewed and set appropriately for your current operational phase
  • Zone transfer (AXFR) restricted to authorized IPs only
  • DNS propagation verified using dig @8.8.8.8 yourdomain.com A or an equivalent tool
  • Old DNS provider records kept intact until global propagation is confirmed

When to use a VPS with a control panel: If you need an integrated environment where DNS, web hosting, and email are managed from a single interface, a VPS with cPanel provides built-in DNS zone management through WHM, eliminating the need to manage DNS separately.

FAQ

How long does DNS propagation take after changing name servers?

Changing NS records at your registrar typically propagates within 24–48 hours, though most resolvers reflect the change within 2–6 hours. The delay is determined by the TTL of the old NS records at the TLD registry level, which you cannot control.

Can I use AlexHost's DNS service without hosting my website on AlexHost?

Yes. The DNS service is independent of your web hosting provider. You can point your NS records to AlexHost's name servers and configure A records pointing to any external IP address, including servers hosted elsewhere.

What is the difference between an A record and a CNAME record?

An A record maps a hostname directly to an IPv4 address. A CNAME maps a hostname to another hostname, which is then resolved to an IP. CNAMEs cannot be used at the zone apex (root domain) because RFC 1034 prohibits coexisting CNAME and NS/SOA records at the same name.

Why is AXFR zone transfer failing during import?

The most common cause is that the source DNS server has AXFR restricted by IP address or disabled entirely. Contact your current DNS provider to temporarily whitelist the AlexHost resolver IP, or export the zone as a file and use the zone file import method instead.

How do I verify that my DNS records are resolving correctly after configuration?

Use the command dig yourdomain.com A @alpha.alexhost.com to query AlexHost's authoritative server directly, bypassing any cached responses. For MX records, use dig yourdomain.com MX. For a full zone view, dig yourdomain.com ANY returns all record types, though some resolvers restrict ANY queries.

15%

Save 15% on All Hosting Services

Test your skills and get Discount on any hosting plan

Use code:

Skills
Get Started