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.

 

這篇文章有幫助嗎?

 列印本文

Also Read

What are the DNS (Nameservers) for Bluebird?

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

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

Where is my Hosting Account Info?

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

How do I addon to my Hosting Package/Plan?

Yes, if you wish to add addtional options or addons to your Hosting account you can do so at all...

Running Scripts

If you are having troubles with Perl CGI or PHP scripts please read the following...

Powered by WHMCompleteSolution