Many people wish to force wither the www or non-www version of their site no matter how the user typed it into their browser. This can easily be done within your .htaccess file if you host on an Apache web server. This video walks you through that process using cPanel.
First log into your cPanel and use your File Manager to navigate to the folder where your .htaccess file lives.
Locate the file and open it for editing.
Once you have the file open you can enter the code to either force www or force the non-www version of your site.
Be sure not to have code for both in the file as it will cause a redirect error and your site will not work.
Once you enter the desired code, save the file. Now you can visit your site and test it. It should always redirect to the version you selected no matter how it is typed in.
For more information on how to force www or non-www, please see our article on the subject.
https://www.inmotionhosting.com/support/website/htaccess/force-www-htaccess
For more information on how to force non-www version for all sites on your account, please see our article.
https://www.inmotionhosting.com/support/website/mass-non-www/
InMotion Hosting was founded in 2001 and provides personal and business web hosting for everyone! For more information about InMotion Hosting and the services we provide see here:
https://www.inmotionhosting.com
First log into your cPanel and use your File Manager to navigate to the folder where your .htaccess file lives.
Locate the file and open it for editing.
Once you have the file open you can enter the code to either force www or force the non-www version of your site.
Be sure not to have code for both in the file as it will cause a redirect error and your site will not work.
Once you enter the desired code, save the file. Now you can visit your site and test it. It should always redirect to the version you selected no matter how it is typed in.
For more information on how to force www or non-www, please see our article on the subject.
https://www.inmotionhosting.com/support/website/htaccess/force-www-htaccess
For more information on how to force non-www version for all sites on your account, please see our article.
https://www.inmotionhosting.com/support/website/mass-non-www/
InMotion Hosting was founded in 2001 and provides personal and business web hosting for everyone! For more information about InMotion Hosting and the services we provide see here:
https://www.inmotionhosting.com
- Category
- InMotion Hosting
- Tags
- How-to (Website Category), .htaccess, www

Be the first to comment