WebSite X5Help Center

 
Vitaly Semenov
Vitaly Semenov
User

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

Автор: Vitaly Semenov
Просмотрено 1031, Подписчики 1, Размещенный 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.

Размещено
1 Ответы - 1 Полезно - 1 Корректно
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

Читать больше
Размещено От Paul M.