webzod
account

Redirect www and apex to one host on WordPress

headers.redirect.www_split · effort: minutes

Why it matters

Both names serve the site, so search engines see duplicate pages and logins, cookies and HSTS are split between two hosts. Pick one canonical host and permanently redirect the other to it.

The fix

  1. Set WordPress Address and Site Address (Settings, General) to the chosen host.
  2. Redirect the other host at the server, host or CDN (see their tabs). If both names reach the same WordPress, it usually redirects to the Site Address by itself; when it does not, a page cache or a second virtual host is answering the other name.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.