|
Tutorial Free PageRank For Joomla |
|
|
|
|
Written by Tutorial Joomla
|
http://yoursite.com http://www.yoursite.com If you can actually have these show up in your browser then you have a problem. What is happening is that Joomla will happily process both URL's, with and without the www. "Is that bad?" you now ask.
Actually yes, I found that on this site, compassdesigns.net actually had a pagerank. I expect people had been linking to me and had been lazy with the www. This meant from Google's point of view, they were actually TWO sits and each was getting ranked individually. Not to even mention the perils of duplicate content!
Luckily there is an easy fix. You just need to edit your .htaccess fiel with the following:
RewriteEngine On RewriteCond %{HTTP_HOST} ^yoursite\.com$ [NC] RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
Note, in the Joomla htaccess file the "RewriteEngine On" statement is already there, you don't need it twice. Forget redirects. Do the following; 1. In the Google webmasters page, tell it that http://www.example.com and http://example.com are the same site. Then tell it which you prefer, and it will index your site the way you prefer from then on. The page ranking will be the same. 2. In Joomla, edit the configuration.php file and set "Livesite" to the exact URL you want - with or without "www". Joomla internal links will then display the way you want. You can see what your Livesite variable is set to in "Global Configuration" in the administrator backend, but you must either set it properly when you install Joomla, or manually edit the config file after install. It's not hard. 3. While you're mucking around with your configuration.php file, why not increase your security by moving it out of the public_html directory - |