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

How to Redirect Non-WWW to WWW

The easiest way to redirect domain.com to www.domain.com on the url address bar whenever someone...

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...

How can i upgrade or downgrade my Hosting?

Upgrading is a simple procedure from the Client Portal that you can do yourself at anytime. When...

How-To prevent people from stealing your files & bandwidth (hotlink)

If you find that people are stealing your files or using your bandwidth tehn you can prevent this...

What are the DNS (Nameservers) for Bluebird?

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

Powered by WHMCompleteSolution