What is an apex domain? DNS setup & best practices guide

Understand what an apex domain is, how they work in DNS and how to configure them correctly for SEO, redirects and modern web infrastructure.

What is an apex domain?

A domain apex is the root of a registrable domain and does not contain a subdomain prefix. Because it sits at the top of a domain’s hierarchy, the apex domain plays a special role in Domain Name System (DNS) configuration and how traffic resolves. In DNS terms, it’s the root of your DNS zone.

Example:

Apex domains vs. subdomains

While the apex domain represents the root of your DNS zone, subdomains sit beneath it and serve more specialized purposes. Understanding how these two levels differ helps clarify why they behave differently in DNS and why they require different approaches when configuring redirects or infrastructure.

What is an apex domain (example.com)

  • The base domain without a prefix.
  • Represents your core brand identity.
  • Common destination for type-in traffic and external links.
  • Often used as the starting point for canonicalization (e.g., deciding between hosting your website on the apex vs. www).

The apex domain name is often redirected to the www subdomain. Many companies will choose to host their website on the www subdomain and redirect the apex to the www subdomain.

If you want to confirm how your apex domain and www version behave, run both URLs through a redirect checker. This lets you see whether one version redirects to the other, which status code is used, and what the final destination is.

Apex domains carry important, mandatory DNS records, such as the:

  • SOA (start of authority) record - defines the administrative starting point for a DNS zone. It tells DNS resolvers which server is authoritative for the domain and how DNS information should be managed.
  • NS (name server) record - identifies the authoritative DNS servers for a domain. A domain typically has multiple NS records for redundancy and reliability.

What is a subdomain?

  • Prefixes that come before the apex.
  • Used to organize content, services or routing.
  • Ideal for specific functions such as:
    • www. for primary website hosting.
    • blog. for content hubs.
    • app. or dashboard. for applications.
    • go. or link. for branded shortlinks or redirects

Subdomains are far more flexible than the apex because they don’t carry the mandatory DNS records (SOA, NS). Subdomains can freely use other types of records that make subdomains easier to integrate with SaaS platforms, CDNs and redirect services, including:

  • CNAME record acts as an alias pointing one hostname to another.
  • A/ AAAA record maps a domain to an IPv4 or IPv6 address, telling browsers where to connect.

Where each fits in DNS architecture

DNS (Domain Name System) is the system that translates human-readable domain names (like example.com) into IP addresses that computers use to find and connect to websites and services. It acts like the internet’s phonebook, directing traffic to the correct destination.

In DNS architecture:

  • The apex domain is the root of your DNS zone and must contain authoritative DNS records like NS and SOA.
  • Subdomains inherit from the apex and sit lower in the hierarchy, not containing zone-defining records.

In practice, this means:

  • If you need to point www.example.com to a redirect platform or CDN, a CNAME record works perfectly.
  • If you need to point example.com (the apex domain) to that same service, you must use A/AAAA records ALIAS/ANAME or DNS CNAME flattening, because a CNAME at the apex isn’t allowed.

What is a CNAME record?

A CNAME record (canonical name record) points a domain or subdomain to another domain. Instead of pointing directly to an IP address, a CNAME tells resolvers: ‘This domain is an alias of that domain, go look up the target’s DNS records instead.’

CNAMEs are commonly used to:

  • Point your website to a CMS (such as WordPress).
  • Integrate with SaaS tools, CDNs and edge networks.

However, CNAMEs cannot be used at the apex domain. This is because the apex must contain mandatory records (NS, SOA and often MX/TXT).

What is an A record?

An A record (Address Record) is one of the core DNS record types. It maps a domain name to an IPv4 address. For example:

  • example.com → A 192.0.2.123.

What is an A record vs. A/AAAA record?

An A record maps a domain name to an IPv4 address, while an AAAA record maps a domain name to an IPv6 address.

Other DNS records

Throughout this guide, you’ll see references to several common DNS record types that play different roles in how a domain functions:

  • MX (mail exchange) record - specifies which mail servers are responsible for receiving email for a domain.
  • TXT (text) record - stores arbitrary text data associated with a domain.

Why apex domains matter for modern websites

The apex domain plays a central role in how users, search engines and services interact with your brand online. While subdomains offer flexibility, the apex remains the anchor point of your digital presence and handling it correctly is essential for performance, SEO and long-term scalability.

Branding for apex domains

Your apex domain is often the simplest, most recognizable version of your brand. It’s what people type instinctively (example.com), what appears on packaging, emails, offline materials and what users share verbally with others.

SEO for apex domains

Search engines treat the apex domain as a core identity signal. Ensuring it resolves correctly is essential for:

  • Consolidating link equity.
  • Avoiding duplicate versions of your site.
  • Maintaining consistent canonicalization.
  • Preserving rankings during migrations or domain changes.

Technical infrastructure for apex domains

The apex domain has unique responsibilities in DNS, which affects how traffic can be routed. It must contain essential DNS records such as SOA and NS. Because of this, it cannot use a CNAME record.

Compatibility with SaaS platforms and CDNs

Modern web stacks often rely on third-party SaaS platforms, CDNs, CMSs and edge networks to serve content. Subdomains integrate easily with these platforms via CNAME records.

Common use cases for apex domains

While apex domains come with some DNS constraints, understanding when to use the apex and when not to can help teams make better decisions around branding, SEO and infrastructure.

Primary website hosting

One of the most common uses of an apex domain is as the primary entry point to a company’s website. Companies must choose between hosting on the apex or a www subdomain.

When to use a subdomain instead

Using the apex domain isn’t always the best choice. Subdomains are often a better fit when:

  • Integrating with third-party SaaS platforms or CDNs that expect a CNAME.
  • Hosting applications, dashboards or APIs.

SEO and performance implications

How you configure and route your apex domain directly impacts SEO performance.

When to use the apex domain vs. www for SEO

From a search engine perspective, there is no inherent ranking advantage to using an apex domain or a www subdomain.

Canonicalization and redirect best practices

Best practices include:

  • Use 301 (permanent) redirects when consolidating apex and www domains.

Technical considerations for apex domains

Why CNAME records can’t be used at the apex

Under DNS standards, a CNAME record cannot coexist with other record types at the same name.

ALIAS, ANAME and CNAME-flattening explained

To work around the CNAME restriction at the apex, many DNS providers support CNAME-like alternatives that remain compliant.

Connecting apex domains to CDNs and cloud platforms

To connect an apex domain to a CDN or cloud service, teams typically use one of the following approaches:

  • A/AAAA records pointing directly to the provider’s edge IPs.
  • ALIAS/ANAME or CNAME flattening.

Best practices for managing apex domains

Given the technical constraints and SEO implications of apex domains, a small set of best practices can help teams avoid common pitfalls:

  • Choose a canonical domain early (www or apex) and apply it consistently.
  • Use 301 redirects to consolidate traffic and preserve SEO authority.