Site Opens Without www but Not With www: One A or CNAME

Site Opens Without www but Not With www: One A or CNAME
Blog 3 min read

Apex and www are separate hosts. A missing A/AAAA or broken CNAME drops one side; apex CNAME often conflicts with MX.

The site loads at example.com but not at www.example.com — or the reverse. That is rarely “hosting is down.” In the zone, the apex (bare domain) and the www host point at different records: one correct A/AAAA, the other missing, wrong IP, or a broken CNAME.

With nameservers ns1.eurovdc.eu / ns2.eurovdc.eu you align both hosts in the same panel. Mail may still use MX securemail.eurovdc.eu (priority 10) and SPF v=spf1 mx ip4:45.84.90.12 -all; web records do not replace mail records. Record types: change nameservers and manage DNS records.

Apex and www are different names

In DNS, @ (apex) and www are separate. An A on apex alone does not resolve www. A CNAME on www alone does not fill apex. The browser queries whichever URL you type; HTTP 301 redirects are a web-server or proxy job after DNS resolves.

One A or one CNAME strategy

  • Both hosts to the same origin: A/AAAA on apex; on www either the same A/AAAA or a CNAME to apex (or to a CDN hostname).
  • CDN / reverse proxy: www often CNAMEs to the CDN; apex needs provider ANAME/ALIAS or apex A records.
  • Single canonical host: DNS should resolve both; then 301 to one canonical URL for SEO and cookies.

Why apex cannot CNAME “properly” in many setups

Per DNS rules a CNAME at the apex cannot coexist with other data at the same name (MX, NS, TXT, SOA). If the domain has MX, an apex CNAME is rejected or breaks mail/DNS in many panels. “I CNAME’d www, so CNAME the root too” is usually wrong. Prefer A/AAAA (or provider ALIAS) at apex; CNAME at www.

Checklist

  1. Compare dig A example.com and dig A www.example.com (and AAAA if used).
  2. Remove stale IPs; collapse duplicate A records to one target.
  3. Test both names via browser and an external resolver before TTL fully drains.
  4. Cover both names (or the single redirect target) on the TLS certificate SAN list.
  5. Do not sacrifice MX/SPF while debugging www — mail stays separate.

While fixing web DNS, leave corporate mail MX alone on corporate email — the fault is usually only the www/apex pair.

FAQ

CNAME on www and A on apex — correct?

Yes, a common pattern. Both must reach the same endpoint (or CDN); then pick one canonical host over HTTP.

What if I put a CNAME on the apex?

It conflicts with MX, NS, or TXT; many panels refuse it. Mail can break. Without ALIAS/ANAME, use A/AAAA at apex.

Is a redirect enough by itself?

No. HTTP redirects need DNS resolution first. Fix both names, then add the 301.

Can missing AAAA break only www?

Some clients prefer AAAA. Apex with AAAA and www without (or the reverse) causes one-sided failures. Keep the pair in sync.

Does a CDN CNAME affect mail?

A www CNAME does not move MX. Accidentally CNAMEing the apex can hurt mail; limiting CNAME to www is usually safe.

www dns a record cname apex nameserver

EuroVDC

Find Your Perfect Domain Name

500+ extensions · Instant activation · Free DNS management

Search for a Domain

Did you find this content useful?

– People found it useful

Share on Social Media

Site Opens Without www but Not With www: One A or CNAME