Переадресація ↳ с www.example.com на ➤ example.com (drupa 8)

переадресація з www


Дуже багато статей SEO написано про те що www. в адресі вже не потрібен, і навіть може зашкодити, і я раджу прибрати ці безглузді символи.

Відкриваємо файл .htaccess яки знаходиться в корені сайту, шукаємо текст:

# To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/foo will be redirected to http://example.com/foo)
  # uncomment the following:
  # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  # RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]

Та розкоментуйти два рядки:

# To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/foo will be redirected to http://example.com/foo)
  # uncomment the following:
   RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
   RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]

Все все з www покінчено.

Leave a Reply