How to redirect non-www URLs to www?

You can redirect all of the requests for yourdomain.com domain to www.yourdomain.com by modifying your website's .htaccess file. You need to add the following lines at the beginning of the file in order to setup that redirection:

Where yourdomain.com is your actual domain name.

You can edit the .htaccess file using the File Manager in cPanel or via FTP.

From now on, when someone access http://yourdomain.com the visitor will be redirected to http://www.yourdomain.com.

You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!