How to Redirect Non-WWW to WWW URLs in Joomla

he Problem


When Search engines crawl your website they will consider http://bluebirdnet.ca and http://www.bluebirdnet.ca different websites. As a result, if your website has been linked to from other websites using the two URLs you are effectively splitting your potential to benefit valuable link popularity.

The Solution


Using a 301 redirect on the “non-www” version of the URL, this is essentially a “permanent” redirect in Hosting talk, you can easily consolidate all of your link popularity to one single URL. This consolidation will serve to increase your website’s chances of obtaining and maintaining top rankings.

Installing a Non-WWW 301 Redirect in Joomla


1. If you are not currently using .htaccess file for SEO purposes then first locate a file called htaccess.txt in your Joomla installation directory and rename file to ".htaccess".
2. Inside that file locate this section;

########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects

3. Edit this file and add the following code and replace example.com with your own domain.


RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

4. Your end result should be this;

########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#

RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

########## End - Custom redirects

5. Login to your Administrator panel in Joomla and go to Global Configuration and set "Use Apache mod_rewrite" to "Yes".

 

Now try refreshing your website and it should redirect to WWW.

 

Was this answer helpful?

 Print this Article

Also Read

Does your PHP installation include IonCube loaders?

Yes, these loaders are available with our PHP installations on all our servers.

I cant connect to Canada Post sellonline.canadapost.ca

If you are setting up a Shipping account for Canada Post in your Shopping Cart and you are...

How do upload files to web space?

There are 2 methods available for doing this. The easiest and best method is to use a FTP client...

What are the DNS (Nameservers) for Bluebird?

Bluebird Hosting uses standard Name Servers (DNS) for all our hosting accounts. Our DNS for all...

Where is my Hosting Account Info?

When you sign-up for a Hosting account all your Hosting Account information is sent in an email....

Powered by WHMCompleteSolution