A single canonical domain is SEO rule #1. Pick one (usually non-www) and 301-redirect the other. Setup: nginx — separate server block for www with return 301; Apache — RewriteRule in .htaccess; Cloudflare — Page Rule. You need a cert for both (usually wildcard or SAN).
Below: step-by-step, working examples, common pitfalls, FAQ.
example.com and www.example.comcertbot -d example.com -d www.example.comcurl -I https://www.example.com → HTTP/1.1 301 Moved Permanently, Location: https://example.com| Scenario | Config / Record |
|---|---|
| nginx minimal | server {
listen 443 ssl;
server_name www.example.com;
ssl_certificate /path/fullchain.pem;
return 301 https://example.com$request_uri;
} |
| Apache .htaccess | RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] |
| Cloudflare Page Rule | URL: www.example.com/* → Forwarding URL → 301 → https://example.com/$1 |
| Reverse: non-www → www | server_name example.com; return 301 https://www.example.com$request_uri; |
| curl test | curl -ILk https://www.example.com 2>&1 | grep -iE "HTTP|Location" |
Server not found on attemptIncorrect or long redirect chains slow down the site, lose PageRank and confuse search crawlers. The tool visualizes the full redirect chain with response codes and timing for each hop.
Shows each redirect step: URL → code → URL → code, through to the final destination.
Measures latency at each redirect step for precise identification of performance bottlenecks.
Distinguishes 301, 302, 303, 307, 308 — each has different behavior for SEO and browsers.
Automatically detects circular redirects and warns before the browser throws an error.
redirect chain audit
301/302 debugging
HTTPS redirect check
UTM link tracking
Redirect check history and API for automated chain auditing.
Sign up freeDoesn't matter — pick ONE canonical and use it consistently. Google and Yandex have long treated both equally.
Yes. The client first establishes TLS with www.example.com — the cert must be valid. Only then does the server return 301.
301 — permanent, allows method change POST→GET. 308 — same but preserves method. For www→non-www use 301 — universally supported.
<a href="/en/redirects">Enterno Redirects Checker</a> shows the chain and warns on loops. Or <code>curl -I -L</code> (follows redirects) — more than 10 hops = problem.