Learn/Website

Website reachability: www, bare domain, and redirects

Your site should load whether people type www or not, end up at one main address, and show the homepage without an error.

Want this checked on your own domain?

Join the waitlist

Updated

Message for whoever manages your website

Hi, could you check how our website’s two addresses behave? Our domain should load the site both with and without “www”, over HTTPS. Please pick one as the main address and have the other redirect to it with a single permanent (301) redirect that keeps the rest of the link. Please also confirm that the homepage loads without an error. Thank you.

Want this checked on your own domain? Join the waitlist.

Check yours

The full domain report (join the waitlist for access) visits both names over http:// and https://, follows every redirect, and shows where visitors end up. To check by hand, open each of these in a private browser window and note the address you land on: http://example.com, https://example.com, http://www.example.com, and https://www.example.com. All four should end on the same https:// address.

Fix it

A working setup needs four things: a DNS record for each name, a web server that answers for each name, one main address, and simple redirects. Work through them in order, then look up the specific result from your report below.

  1. Choose your main address. Either name works. The bare domain can’t use a CNAME record (see why), so if your web host asks you to connect the site with a CNAME, the www name is simpler, unless your DNS host offers a CNAME-like record for the bare domain. Cloudflare calls this CNAME flattening, and DNSimple calls it an ALIAS record. Amazon Route 53 has alias records, which can point only to AWS resources or to another record in the same zone. If the site already has search listings and links under one name, keeping that name avoids a move.
  2. Give both names DNS records. At your DNS host, add the records your web host documents: A records (IPv4 addresses) and AAAA records (IPv6 addresses) for the bare domain, and a CNAME or A/AAAA records for www. Remove records that still point at a previous host.
  3. Attach both names to the site at your host, and make sure the site’s certificate covers both. The TLS certificates guide explains how, and the SSL checker shows which names a certificate covers.
  4. Redirect the other name to the main one. Use one permanent redirect (status 301 or 308) that goes straight to the final https:// address and keeps the path and query, so http://www.example.com/contact?ref=ad goes to https://example.com/contact?ref=ad in one step. Set the redirect in one place only, at your CDN or on your server, not both. The HTTPS guide covers the http:// to https:// part.
  5. Confirm. Repeat the four-address check above, then run the report again.

How long changes take. Your DNS host publishes a change on its own schedule, but resolvers that looked the name up recently keep their saved answer until it expires. A record’s TTL (time to live, in seconds) sets how long a resolver may keep it (RFC 1034 §3.6). A “doesn’t exist” answer is remembered for the smaller of the zone’s SOA record TTL and the SOA record’s last field (RFC 2308 §3, §5).

Where redirects live. On Cloudflare, create a redirect rule under Rules → Overview → Create rule → Redirect Rule; Cloudflare’s documentation includes www-to-root and root-to-www examples, and the name being redirected must be proxied through Cloudflare. On nginx, a server block for the name you are retiring can answer with return 301 https://example.com$request_uri;. On Apache, Redirect permanent / https://example.com/ inside that name’s VirtualHost sends every path to the same path on the main name. Note that Apache’s Redirect without a status is a temporary 302.

server {
    # Retire www: send every www request to the same path on the bare domain.
    listen 80;
    listen 443 ssl;
    server_name www.example.com;
    # ssl_certificate and ssl_certificate_key for www.example.com go here.
    return 301 https://example.com$request_uri;
}

The website doesn’t respond

What it means. At least one of your names points to a public internet address, but no request to either name got a response. Each attempt was refused (nothing accepted the connection), timed out, couldn’t set up a secure connection, or didn’t return a complete response in time. (A server that answers but presents a certificate browsers reject is reported as a certificate problem instead; see TLS certificates.) In Chrome, visitors see errors such as ERR_CONNECTION_REFUSED or ERR_CONNECTION_TIMED_OUT.

Why it matters. Nobody can reach the site.

Fix.

  1. Ask your web host whether the site is running and accepting connections on ports 80 (http://) and 443 (https://).
  2. If you moved hosts recently, compare your A, AAAA, and CNAME records with the values the new host documents. Records left pointing at an old server send visitors to a machine that no longer serves the site.
  3. If a firewall or CDN sits in front of the server, check that it lets public web traffic through.
  4. If https:// shows a certificate warning in your browser while http:// doesn’t load at all, fix the certificate first; the TLS certificates guide covers each warning.

Confirm. Both http:// and https:// addresses open in a browser, and the report no longer shows this result.

The homepage shows a server error

What it means. The address visitors end up on answered with a 5xx status, which means the server knows it failed or can’t handle the request (RFC 9110 §15.6). A 500 is an error inside the site’s software. A 502 or 504 means a proxy or CDN in front of the site got a bad answer, or no answer in time, from the server behind it (§15.6.3, §15.6.5). A 503 means the server is overloaded or down for maintenance (§15.6.4).

Why it matters. Visitors see an error page. Google slows its crawling when it gets 5xx answers, and pages that keep returning them are eventually dropped from search.

Fix.

  1. Ask your host or developer to check the site’s error logs at the time of the check.
  2. For a 502 or 504 behind a CDN, check that the server behind it is running and reachable from the CDN.
  3. If the site is in planned maintenance, a 503 is the right answer; make sure the maintenance ends.

Confirm. The homepage loads in a browser, then run the report again.

The homepage says “not found”

What it means. The address visitors end up on answered 404 (not found) or 410 (gone). Possible causes: the domain isn’t attached to the right site at your host, so the host shows its own “not found” page; the site isn’t published; or a redirect points to a page that was removed.

Why it matters. Visitors see an error instead of your homepage, and Google doesn’t index pages that return a 4xx status.

Fix.

  1. In your host’s settings, check that this domain (and www) is attached to the site you expect.
  2. Check that the homepage is published.
  3. If the homepage redirects to another path, for example /home or /en/, check that the target exists.

Confirm. The homepage loads, then run the report again.

The homepage returns an error

What it means. The address visitors end up on answered with a 4xx status other than 401, 404, or 410, and the response wasn’t a recognized bot-protection page. For example, 403 (forbidden) means the server understood the request and refused it (RFC 9110 §15.5.4). A 421 means the server isn’t set up to serve this name (§15.5.20).

Why it matters. Visitors and search engines get an error instead of the page.

Fix.

  1. Ask your host or developer why the homepage returns that status. For a 403, ask which access rule or setting refuses the request. For a 421, attach the name to the site at your host.
  2. If the page loads normally for you, the server may be treating some requests differently, for example by country or network. Our check identifies itself as a desktop Chrome browser.

Confirm. The homepage loads from another network (for example, a phone on mobile data), then run the report again.

The www address doesn’t exist

What it means. example.com works, but www.example.com has no address records (no A or AAAA records). Either the name doesn’t exist at all, or it exists without any address. When the name doesn’t exist, Chrome shows DNS_PROBE_FINISHED_NXDOMAIN.

Why it matters. People who type www get an error. Many sites have no www address on purpose; adding one costs little and catches those visitors.

Fix.

  1. At your DNS host, add a record for www using the values your web host documents (for example, a CNAME to a hostname the host gives you).
  2. Attach www to the site at your host and make sure the certificate covers it.
  3. Redirect www to your main address with one permanent redirect, as in step 4 above.

Confirm. dig +short www.example.com A returns an address (or a CNAME followed by addresses), and https://www.example.com lands on your main address. If someone looked the name up shortly before your change, their resolver can keep the “doesn’t exist” answer for the negative-caching time described above.

The bare domain doesn’t lead anywhere

What it means. www.example.com works, but example.com (the “bare” domain, also called the apex or root) has no A or AAAA records.

Why it matters. Anyone who types your domain without “www”, or follows a link written that way, gets an error.

Fix.

  1. Add the A records (and AAAA records, if your host publishes IPv6 addresses) that your web host documents for the bare domain.
  2. If your host gives you only a hostname to point at, you can’t use a CNAME at the bare domain. Use your DNS host’s CNAME-like record instead: CNAME flattening at Cloudflare, an ALIAS record at DNSimple, or an alias record at Amazon Route 53 when the target is an AWS resource.
  3. Attach the bare domain to the site at your host, make sure the certificate covers it, and redirect it to www with one permanent redirect.

Confirm. dig +short example.com A returns an address, and https://example.com lands on your main address.

One of the addresses doesn’t load

What it means. One name works, but the other has a public address that doesn’t respond: connections are refused, time out, or fail before a response arrives. Two possible causes: the record points at an old server, or the web server isn’t set up to answer for that name.

Why it matters. Everyone who uses that name gets a connection error.

Fix. Point the failing name at the same host as the working one (copy the values your host documents for it), attach it to the site, and redirect it to your main address.

Confirm. Both names open in a browser and end on your main address.

The site redirects in a loop

What it means. Following the redirects from one of the four addresses leads back to an address already visited, or goes on for more than 20 redirects, the most browsers follow (WHATWG Fetch). Browsers give up: Chrome shows ERR_TOO_MANY_REDIRECTS, and Firefox shows “The page isn’t redirecting properly”.

Why it matters. The site doesn’t open for anyone who starts at that address.

Causes. Two places disagree about redirects. Cloudflare documents how this happens with its service: its SSL/TLS encryption mode is Flexible (so it talks to your server over http://) while your server redirects http:// to https://; “Always Use HTTPS” or HSTS is on at Cloudflare while your server redirects https:// back to http://; or two redirect rules send traffic in opposite directions, for example between www and the bare domain. The same conflicts can arise between any CDN and server.

Fix.

  1. Trace the loop. curl -sIL --max-redirs 12 http://example.com/ prints the status and location of each step, so you can see where it turns back. curl doesn’t remember earlier redirects the way a browser can, so it shows what the server sends now.
  2. Decide where redirects should live, at your CDN or on your server, and remove the conflicting rule from the other place.
  3. On Cloudflare with Flexible mode, either remove the http:// to https:// redirect from your server or set the encryption mode to Full or Full (strict), which needs a certificate on your server.

Confirm. The trace ends on one page with status 200, and the site opens in a private browser window. Browsers may keep a permanent redirect they saw before the fix (RFC 9110 §15.4.2), so test in a fresh window.

The site redirects to an address that doesn’t load

What it means. One of the four starting addresses redirects, but the address it sends visitors to doesn’t answer. The report names that address and why it fails, for example: its name doesn’t exist in DNS or has no address records, its server refuses the connection or doesn’t answer in time, or the secure connection or its certificate fails. (When that address is example.com or www.example.com itself and its certificate or secure connection fails, the report shows a certificate problem instead; see TLS certificates.) Possible causes: the redirect points to an address that was retired, such as an old domain or a www name without DNS records, or it sends http:// visitors to https:// on a server that doesn’t accept secure connections.

Why it matters. Everyone who starts at that address gets an error instead of the site, the same error they would see if the site were down. In Chrome that is, for example, DNS_PROBE_FINISHED_NXDOMAIN or ERR_CONNECTION_REFUSED, or a security warning when the certificate isn’t valid.

Fix.

  1. Trace the redirect. curl -sSIL http://example.com/ prints the status and location of each step, then the error at the address that fails.
  2. If that address is the one you want, make it work: add its DNS records at your DNS host, attach it to the site at your web host, and make sure the site’s certificate covers it (see the TLS certificates guide).
  3. If that address is wrong or retired, change the redirect to go straight to your main address, as in step 4 above.

Confirm. The trace ends on one page with status 200, and the starting address opens in a private browser window.

The site appears at two addresses

What it means. Both example.com and www.example.com show the site, each at its own address, and neither redirects to the other.

Why it matters. Search engines treat the two as duplicates and choose one to show. A redirect is the strongest signal you can give for which one that is, and it lets search engines combine what they know about both addresses, such as links to each, into one (Google Search Central, canonicalization). Visitors also see two different addresses for the same site.

Fix. Choose one main address and redirect the other to it with a permanent 301 or 308 redirect that keeps the path. Make the page’s canonical link point to the main address too (see page basics).

Confirm. The other name now ends on your main address.

Long chain of redirects

What it means. From at least one of the four starting addresses, reaching the site takes more than three redirects. For example: http://example.com → https://example.com → https://www.example.com → https://www.example.com/en/ → https://www.example.com/en/home.

Why it matters. Each redirect is another request and response before the page can start loading (RFC 9110 §15.4). Google’s crawlers follow up to 10 redirects, and an earlier HTTP standard recommended at most five, a limit some clients may still apply.

Fix. Point every old address straight at the final address in one step. Where you can, serve the homepage at / instead of redirecting it to a deeper path.

Confirm. curl -sIL http://example.com/ shows at most one or two redirects before the final page.

The domain points to a private network address

What it means. The name resolves only to addresses that can’t be reached from the internet: private ranges such as 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 (RFC 1918), loopback addresses such as 127.0.0.1 and ::1, or other reserved ranges (RFC 6890). Such records can be left over from an office network, a test setup, or an internal server.

Why it matters. Visitors’ browsers try to connect to a machine on their own network, or to nothing, and the site doesn’t load.

Fix. Replace the records with the public addresses your web host documents. If the name is meant only for an internal network, keep it out of your public DNS.

Confirm. dig +short example.com A returns your host’s public address.

Other results in the report

These results don’t count as problems, but they explain what the report could check.

No website on this domain

Neither example.com nor www.example.com has an address record, so there is no website to check. That’s normal for a domain used only for email. If you expected a site, add the records from step 2 above.

The homepage asks for a login

The homepage answered 401: the server asks visitors to sign in before showing anything (RFC 9110 §15.5.2). That’s expected for a private or staging site. Search engines can’t see behind the login, and Google doesn’t index pages that return a 4xx status, so remove the password before the site goes public.

This site limits automated visitors

A bot-protection service in front of the site answered our check with a challenge or block page instead of the homepage. This is a setting, not a fault, and the report doesn’t count it as one. Checks that need the homepage itself (HSTS, security headers, search indexing, page details, link previews, and mixed content) couldn’t run. If you didn’t expect visitors to be challenged, review the bot-protection settings at your CDN or host.

Forwards to another domain

Your domain sends visitors to a site on a different domain, for example from example.com to example.net. The website checks then cover only the forwarding; the HTTPS, HSTS, security header, page, and mixed-content checks are skipped. Run a separate report on the destination domain. Make sure the forwarding works over both http:// and https:// and uses one permanent redirect.

Technical reference

What the report checks

  • A and AAAA lookups for the apex (example.com) and www.example.com. A name “resolves” when it has at least one address after following any CNAME. A name whose addresses are all non-public isn’t contacted.
  • For each name with a public address, a GET of http://<name>/ and https://<name>/, following redirects one hop at a time. Every hop’s hostname is resolved and checked the same way. The request uses a desktop Chrome user agent.
  • Limits: 6 seconds to open a connection, 10 seconds between reads, and 15 seconds for the whole response. A chain stops when it revisits a URL or would follow a 21st redirect, as browsers do (WHATWG Fetch).
  • Certificates are verified. When verification fails, the certificate details come from a second, unverified request, reported in the TLS certificates guide.
  • A name “responds” when the first request of its http:// or https:// chain got any HTTP response, including an error status. A name whose https:// server answers only with a certificate that fails verification counts as answering for the “doesn’t respond” and “one address doesn’t load” results; the certificate problem is reported by the certificate check, and the homepage results below need a name that responds.

The homepage the report evaluates is the end of one chain: the apex’s https:// chain if its first request got a response, otherwise www’s https:// chain, otherwise the apex’s http:// chain, otherwise www’s.

How each result is decided

ResultCondition
No websiteBoth names have no addresses, and both lookups completed
Private addressA name has addresses, none of them public
Doesn’t respondNo name responds, and at least one has a public address
www or bare domain missingOne name responds; the other has no addresses (NXDOMAIN or no A/AAAA)
One address doesn’t loadOne name responds; the other has a public address and doesn’t respond
Redirect loopAny chain from a responding name revisits a URL or exceeds 20 redirects
Redirects to an address that doesn’t loadAny chain from a responding name redirects to an address that gives no HTTP response: its name doesn’t resolve to a public address; the connection, the secure connection, or certificate verification fails; or no complete, valid response arrives in time. A failed secure connection or certificate at https:// on either of your two names is reported by the certificate check instead. When the homepage chain ends this way, the status results below don’t apply
Limits automated visitorsThe homepage status is 401, 403, 405, 406, 409, 429, or 503 and the response matches a known bot-protection challenge, or the status is 429
Server errorHomepage status 500 or higher
Not foundHomepage status 404 or 410
Asks for a loginHomepage status 401
Returns an errorAny other homepage status from 400 to 499
Forwards to another domainThe homepage’s registrable domain (per the Public Suffix List) differs from yours
Appears at two addressesBoth names respond, each ends on a non-redirect response, the final pages are on different origins (scheme, host, and port), and the site doesn’t forward elsewhere
Long redirect chainThe longest chain from a responding name has more than 3 redirects

When the homepage is a bot-protection page, the checks after it in this table don’t run.

Why the bare domain can’t be a CNAME

A CNAME record makes a name an alias, and a name with a CNAME can have no other data (RFC 1034 §3.6.2; RFC 2181 §10.1). The top of every zone, the bare domain, must carry the zone’s NS records and its SOA record (RFC 1034 §4.2.1), so the bare domain can’t be a CNAME. MX records for email at the bare domain would conflict with a CNAME for the same reason. CNAME flattening, ALIAS records, and Route 53 alias records work around this inside the DNS host: it looks up the target’s addresses itself and answers with A and AAAA records.

Redirects

  • 301 and 308 are permanent; 302, 303, and 307 are temporary (RFC 9110 §15.4). 307 and 308 keep the request method; with 301 and 302 a client may change POST to GET (§15.4.2, §15.4.3).
  • 301 and 308 responses are heuristically cacheable, so browsers may reuse a permanent redirect without asking the server again (§15.4.2, §15.4.9).
  • Google treats 301 and 308 as a signal that the target should be the canonical address, and 302, 303, and 307 as temporary.
  • Clients should detect redirect loops (RFC 9110 §15.4). Browsers that follow the Fetch Standard stop with a network error after 20 redirects. Google’s crawlers follow up to 10.

Sources

Want this checked on your own domain?

Join the waitlist
Domain Readiness

Free checks for email, website, DNS, and registration, with plain-English fixes.

Domain Readiness™ (domainreadiness.com) is a service of Riviera Learning, LLC.