Search Engine Optimization & Performance tuning for your Joomla website

Web Hosting

www or non-www URL's

Want to support this site? Buy my E-book: Joomla 3.5 SEO & Performance!

If you Joomla site is accessible either with or without a www-prefix is actually also a matter of duplicate URL's. Google could see these pages as multiple instances of the same content and penalize your site for it. Make sure you choose one of those and make sure the other one is not accessible at all. Which one you choose does not matter for Google, but if Google does not care, why bother to type the www every time. Unless there are specific reasons, choose the non-www version.

After you made your choose, configure your site to be accesible through only your choice, and set up a redirect from the non-preferred version to the other one. If you already have a SEF extension on your site, it may already have an option to do so. If not, it is very easy to set up the redirect in your .htaccess file:

www to non-www redirect

RewriteEngine On
RewriteCond %{HTTP_HOST}
RewriteRule (.*) [R=301,L]

non-www to www redirect

RewriteEngine On
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$ [L,R=301]

After the change, check if the redirect works as desired.

By the way, if you have an SSL certificate installed, you could have similar issues with pages being accessible with http:// or https://. This is a bit more difficult to solve, as you will probably want some pages to be accessible over https://, like the checkout pages of your webshop, and others not. You could use an extension to manage this, like the Yireo SSL Redirect plugin. As an alternative you could force all traffic over SSL, but this will usually slow down your site.

Specify preferred domain in Google Webmastertools

Secondly, make sure to go into Google Webmaster Tools and specify how you want Google to index your site, with or without www. Even if you did not do the previous step, still do so. It's a very simple step in the configuration: Click the configuration icon in your Webmaster configuration and click Site Settings. Then you can set the preferred domain.


Web Hosting