How to “The page isnt redirecting properly”

I installed WP 4.2.2 a while ago, using “name.com” as the name, so without “www“. Everything works fine, however, I would like to use the domain WITH “www“.

I tried to change this in the regular options, but when I do, the site can’t be found and an error is returned.

Foutcode: ERR_TOO_MANY_REDIRECTS.

To solve this I had to login into the MySQL database and change ‘wp-options‘ to get the site working again.

I also tried to change the htaccess with the same error.

  1. # BEGIN WordPress
  2. ErrorDocument 401 default
  3. <IfModule mod_rewrite.c>
  4. RewriteEngine On
  5. RewriteBase /
  6. RewriteCond %{HTTP_HOST} !^www\.
  7. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  8. RewriteRule ^index\.php$ - [L]
  9. RewriteCond %{REQUEST_FILENAME} !-f
  10. RewriteCond %{REQUEST_FILENAME} !-d
  11. RewriteRule . /index.php [L]
  12. </IfModule>
  13.  
  14. # END WordPress

The clients really wants to solve this, because the old site is using all pages with “www”.

Other things I found using Google:

– Change wp-admin permissions to 644 instead of 755, this results in blank pages.

– Add these to wp-config, this results in the same error:

  1. define('WP_HOME','http://example.com');
  2. define('WP_SITEURL','http://example.com');

Hope it work.