In this tutorial we will show you how you can redirect your website to WWW version by using htaccess. You just have to add a few lines in your htaccess to redirect your domain to www one.

By using this method you will be able to redirect your to

From the SEO point of view, both URL’s are not same. You need to redirect either on of them to the other or it may create duplicate content issues. So if you have decided to move the domain to WWW version, follow the tutorial further.

Steps to access and edit .htaccess

Keep your cPanel account ready and start doing the steps given below.

Step 1. Login to your cPanel account and look for File Manager.

Step 2. Navigate to public_html directory or the root public directory of your domain.

Step 3. Click on settings in the top right corner of the page.

Step 4. Click the checkbox saying show hidden (.dotfiles).

Step 5. Now you’ll see the .htaccess file in your file manager.

Step 6. Do a right click on the .htaccess file and hit Edit buttton.

Step 7. Enter the code like this in the bottom of the .htaccess file.


#Redirect to www location

RewriteEngine on
RewriteBase /
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$$1 [r=301,nc]

Step 8. Click on Save Changes button and Voila! You redirected your normal domain to www.

Don’t forget to change to your domain name in the code, also make sure if you are using SSL certificate, then change the http to https.


This is how you can easily redirect non www domain to www just by adding few lines of code in the .htaccess file. If you are facing any issues under Host It Bro network, just open a support ticket to get help in redirection. Stay tuned for more Simple and effective tutorials!

Previous ArticleNext Article

Leave a Reply

Your email address will not be published. Required fields are marked *