WordPress sites keep redirecting to no-www WordPress sites keep redirecting to no-www wordpress wordpress

WordPress sites keep redirecting to no-www


The issue actually had nothing to do with WordPress. After recently upgrading to Plesk 11.5 there is an option in the domain's "Hosting Settings" that was wrong. The setting is called "Preferred domain".

Preferred domain:

Regardless of the domain's URL that visitors specify in a browser (with the www prefix or without it), a page with the preferred domain's URL opens. The HTTP 301 code is used for such a redirection. The 'None' value means that no redirection is performed.

For some reason it defaults to "domain.tld" but it should be set to "None". This fixes the problem instantly and now WordPress does not go into a redirect loop.

Here are the steps to change it:

  1. Go to your domain name
  2. Click on "Websites & Domains"
  3. Click on "Hosting Settings"on the domain name
  4. Find "Preferred domain" and select "None"