My WordPress Address (URL) in general settings keeps losing the www from the URL – I type in http://www.domain.com and it saves and works fine.
Next time I go in the address has changed to http://domain.com. So again I change it, I get logged out and I log back in and it looks fine until next time and it has changed again.
This is the only setting which changes (site address keeps the www) and I have checked my htaccess and cannot see anything untoward and there are no parked domains etc – any idea what could be causing this?
Most of the time it doesn’t cause any issues but sometimes when I visit the site it defaults to the non www version which could be detrimental to SEO as well as it affects my SSL for some secure pages as I only have the SSL for www.domain.com so I would like to fix it if I can.
You could possibly set the URL in your
wp-config.php
, this will override the URL stored in the database (the one set in general settings):So this should help to keep the
www
in your URL, but of course it doesnât solve the strange behaviour itself. One thing I could think of: Can you check ifupdate_option( 'siteurl', 'http://example.com' );
is set anywhere? Typically this is set infunctions.php
and is used for changing the URL without having access to the backend.Ensure that you haven’t defined it in your
wp-config.php
http://codex.wordpress.org/Changing_The_Site_URL#Edit_wp-config.php