Joomla! How To Remove WWW From Domain and Why It Matters
Joomla! How To Remove WWW From Domain and Why It Matters
Joomla! How To Remove WWW From Domain and Why It Matters
Why remove “WWW” from your Domain Name?
Simply put, the “www” in front of a domain name is not necessary and it is much more convenient to
type the URL without the “www” sub domain. Web servers display pages though the main domain
name unless a particular subdomain is required; the use of the www subdomain is simply redundant.
When you write an email to someone you address it to [email protected] instead of addressing it
to [email protected]. The mail client assumes the SMTP protocol; the www sub domain is
just as redundant as the proposed mail sub domain.
How do you remove "WWW" from your domain name?
Add the following to your “.htaccess” file located in the root directory. If you do not have an .htaccess
file, rename the htaccess.txt delivered with Joomla! to .htaccess. This method requires Apache Mod
Rewrite module enabled. If you have access to the apache server configuration file
(/etc/httpd/conf/httpd.conf), ModRewrite is enabled if the line “LoadModule rewrite_module
modules/mod_rewrite.so” does not have a '#' in front of it. If you get an error code 500 while trying to
browse the directory with the .htaccess file, ModRewrite is not enabled. If your website is hosted and
you have problems, talk to your web host about your Apache configuration and ask if mod_rewrite
capability is enabled.
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
Note: replace “example.com” with your domain name
How to define 'preferred domain' using Google Web Master Tools
The preferred domain is the one that you would liked used to index your site's pages (sometimes this is
referred to as the canonical domain). Links may point to your site using both the www and nonwww
versions of the URL (for instance, http://www.example.com and http://example.com). The preferred
domain is the version that you want used for your site in the search results. In addition, defining a
preferred domain can be helpful to your Google Page Rank (GPR) because you won't have two copies
of the same page indexed. Each page is only able to pass a fixed amount of PR. If it is passing PR to
both the nonwww and www versions of your domain, both pages will only get half the correct amount.
If the www redirects to the the nonwww, the nonwww will get all the PR. You can set your preferred
domain by adding the site to your Google Sitemaps account and verifying site ownership. Then:
1. On the Webmaster Tools Dashboard, click the URL for the site you want.
2. Click Tools, and then click Set preferred domain.
3. Choose from the following:
• Display URLs as http://www.example.com
• Display URLs as http://example.com
• Don't set an association