I recently launched 3 new WordPress sites and for some reason they are all getting redirect loops. Going to www.example.com
redirects to example.com
. On one of them I have just decide to stick with the non-www since it was a brand new site, however the others I need to force the www.
So far I have tried the following:
- Changing
.htaccess
to force www â Did not work - Defining my blog & site url in
wp-config.php
â Did not work - Updated database changing from
www.example.com
toexample.com
and the back towww.example.com
just trying to reset it â Did not work
I’ve never experienced this issue before until recently.
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:
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: