cPanel: Forcing website URL to load www. prefix

This article provides you with steps to force your website to load the www. prefix e.g




Step 1– Login to cPanel

  • Please see our article on logging into cPanel here.



Step 2 – Click on File Manager under your Files section.




Step 3 – Edit your .htaccess file 

  • Click on your website folder and edit your htaccess file
  • If one doesn’t exist create a new htaccess file 



  • Add the code below to your .htaccess file



RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule (.*)$1 [R=301,L]



That’s it !  Your website will now load to display

TIP: More articles on cPanel can be found here. Alternatively you can contact our Support Center by clicking here.

Was this post helpful?