301 redirect from non www to www
-
Hi,
According to pingdom tools the 301 redirect from the non www to www version of our site takes 4 seconds to load and the redirect from http to https takes another 3 seconds.
After reading many threads I have a few questions:
1) For the non www redirect I simply added https://www.mydomain.com in the WP Settings > General page. In some articles it is mentioned that this is enough but I read many people are also editing the htaccess with the following code. What is the difference if any and which one is better?
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
2) I am forcing https using cloudflare page rules. Would using a 301 redirect in htaccess speed the site? (not sure if this is something that can be done at all)
Thanks in advance!
- The topic ‘301 redirect from non www to www’ is closed to new replies.