Home
/
Other Applications
/
How to redirect Magento to open through www?

How to redirect Magento to open through www?

To redirect your Magento application to open through www, add the following lines in your .htaccess file:

RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]

Replace yourdomain.com with your actual domain name.

Then go to your admin area > System -> Configuration > Web. Under “Unsecured” set the “Base URL” to http://www.yourdomain.com.

Save the changes and clear the cache of your Magento.

Share This Article