Guides › Hosting, domain & email › Domain, DNS & SSL

Domain Has Two Websites or Redirects Loop Between www and Non-www

Conflicting settings at the host, CDN and WordPress can make addresses bounce back and forth.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Domain, DNS and SSL

If www and non-www show different sites, or bounce between each other until the browser says too many redirects, two rules disagree. Choose one version as the main address and redirect the other to it, in only one place.

1Pick one version2Check DNS for both names3List every redirect rule4Keep only one5Check WordPress addresses6Check Cloudflare SSL mode7Clear caches and testFixed? Test the site. If not, get help.
The steps in order. Work down the list and stop when the problem is solved.

Step 1: Pick one version

Illustration for Step 1: Pick one version

Choose www.yourdomain.com or yourdomain.com as the main address. Either is fine for Google, but you must be consistent.

Step 2: Check DNS for both names

Illustration for Step 2: Check DNS for both names

The bare domain needs an A record and www needs an A record or a CNAME to the same server. If www points somewhere else, it will show a different site.

Step 3: List every redirect rule

Illustration for Step 3: List every redirect rule

Redirects can live in your hosting panel (Redirects), .htaccess, a CDN rule, a WordPress plugin and the site settings. Write down each one.

Step 4: Keep only one

Illustration for Step 4: Keep only one

Delete duplicates. A rule that sends www to non-www plus another that sends non-www to www creates a loop.

Step 5: Check WordPress addresses

Illustration for Step 5: Check WordPress addresses

In Settings, General, the WordPress Address and Site Address should both use the chosen version, including https.

Step 6: Check Cloudflare SSL mode

Illustration for Step 6: Check Cloudflare SSL mode

SSL mode Flexible with a server rule forcing HTTPS causes an endless loop. Use Full or Full (strict) once the server has a certificate.

Step 7: Clear caches and test

Illustration for Step 7: Clear caches and test

Purge site cache and CDN, then visit both versions in a private window. One must redirect, with a 301, to the other.

Still stuck?

If these steps do not solve it, we fix it for you for a flat $99. Full refund if we do not solve it within 7 days.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-22.