<IfModule mod_rewrite.c>
#Force www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301,NC]
</IfModule>
<IfModule mod_rewrite.c>
#Force non-www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]
</IfModule>
RewriteCond %{HTTP_HOST} ^xxx\.xxx\.xx\.xx
RewriteRule (.*) https://mydomain.com/$1 [R=301,L]
This no longer affects SEO. It used to at a point of time where google considered www and non www version to be 2 different domains. This is no longer the case. In your google webmasters dashboard, you can tell which one you want google to use as primary. What google will do then is consider both versions as valid and associate the secondary version with the primary you set.When I set up a new website and go to Google WMT and I saw 2 options, WWW and non-WWW. which one should I choose and do them affect search rankings?
www- world wide web is better for selecting website. Still now worldwide SEO or Google search engine showing the result including www. So it will be better if you choice www and do SEO with www- than it will be better for your website.When I set up a new website and go to Google WMT and I saw 2 options, WWW and non-WWW. which one should I choose and do them affect search rankings?
Waiting for your valuable answers.
ForumWeb.Hosting is a web hosting forum where you’ll find in-depth discussions and resources to help you find the best hosting providers for your websites or how to manage your hosting whether you are new or experienced. You’ll find it all here. With topics ranging from web hosting, internet marketing, search engine optimization, social networking, make money online, affiliate marketing as well as hands-on technical support for web design, programming and more. We are a growing community of like-minded people that is keen to help and support each other with ambitions and online endeavors. Learn and grow, make friends and contacts for life.
The world's smartest hosting providers come here to discuss & share what's trending in the web hosting world!