Every page without w w w redirects to the homepage. Pages work normally with the w w w & the homepage redirects from non w w w to w w w.

(I want w w w only on the website)

I have tried changing configuration / web /auto redirect to base url but this just makes all of the pages accessible with w w w or without so causes duplicate content.

1 Answer 1


Adding this to htaccess fixed the exact same problem for me.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.