1. Home
  2. Website
  3. cPanel: Forcing website URL to load www. prefix

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 https://www.yourdonain.co.za

 

 

 

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} ^yourdomain.co.za$ [NC]
RewriteRule (.*) http://www.yourdomain.co.za/$1 [R=301,L]

 

 

That’s it !  Your website will now load to display https://www.yourdonain.co.za


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

Updated on August 30, 2023

Was this article helpful?

Related Articles