WebSite X5Help Center

 
Vitaly Semenov
Vitaly Semenov
User

Redirect traffic from the address www on the address non www  en

Autor: Vitaly Semenov
Besucht 1035, Followers 1, Geteilt 0  

Hello.
I have added your site to Google webmaster.com. He is there in the two kinds of addresses www.vitsem.com and vitsem.com. Tell me how can I check that they do not work as the two sites. I want all traffic going to vitsem.com. How do I do this? And how can I check that it is need? 
Thank you very much.

Gepostet am
1 ANTWORTEN - 1 NüTZLICH - 1 KORREKT
Paul M.
Paul M.
Moderator

Hello Vitaly,

Put the following code inside your .htaccess file in the root folder of your X5 project on your web server:

#Redirect www to non-www
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.vitsem.com [NC]
RewriteRule ^(.*)$ http://vitsem.com/$1 [L,R=301]

This will ensure that each and every page which a visitor requests is directed to the non-www version.

The redirect as above is permanent, and as such should not affect your search engine ranking.

Kind regards,

Paul

Mehr lesen
Gepostet am von Paul M.