Home     Blog

Should I Use WWW in my site name?

Some users type “www.topbits.com” into their web browsers when they want to reach this web page. Other users type in only “topbits.com”, leaving off the “www” portion.

On a technical level, the two names do not refer to the same domain object.

Google, and other search engines, often see these two objects as seperate web servers.

Check the PageRank for several domains to see the results of this. For some domains, the PageRank will be the same for both the www and non-www domains. For other domains, the PageRank will differ for each domain.

If your web server does not answer on both names, users may become confused and not be able to get to your site.

On the other hand, if your web server does answer on both domains, other webmasters may link to either name for your site. The trouble this causes is that your links are now split between two domains, weakening their effectiveness.should i use www in my site name Should I Use WWW in my site name?

Most webmasters choose to redirect all user requests to the www version of their domain name. Try typing “topbits.com” into your web browser. You will automatically be redirected to “www.topbits.com”.

The best way to implement this on your web server is to use Apache’s mod_rewrite functionality to redirect all user requests to the domain name of your choice.

Loading mod_rewrite into Apache

The first step is to edit your httpd.conf file to load the mod_rewrite module.

This has most likely already been done. If not, however, it is very simple to add.

1. Find the section in your httpd.conf file which contains the LoadModule commands.

2. Add this LoadModule command if it does not already exist:

LoadModule rewrite_module /usr/local/libexec/apache/mod_rewrite.so

Be sure to use the correct location of the mod_rewrite.so file on your system.

Option: httpd.conf or .htaccess

The next step is to configure the rewriting rules. This may be done either in your httpd.conf file or in individual .htaccess files.

If you have access to httpd.conf, it is probably easiest to make the modification there. If you are on a shared server and do not have access to edit the httpd.conf, it is no more difficult to make the modifications to your .htaccess file.

The choice of locations is often a matter of personal taste.

Rewriting to WWW in httpd.conf

To configure the rewrite rule in httpd.conf, edit the appropriate VirtualHost container.

Add the lines below to the VirtualHost container for your web site.

Be sure to edit the hostname to match the settings on your server.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.example.com(:80)?$
RewriteRule ^/(.*) http://www.example.com/$1 [L,R=301]

Rewriting to WWW in .htaccess

The syntax for .htacess is very similar

Be sure to edit the hostname to match the settings on your server.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.example.com [NC]
RewriteRule ^(.*) http://www.example.com/$1 [L,R=301]
</IfModule>

For more detailed instructions on implementing a redirect to WWW into .htaccess, read That Pesky www.

VN:F [1.9.17_1161]
Rating: 9.5/10 (2 votes cast)
Should I Use WWW in my site name?, 9.5 out of 10 based on 2 ratings
Follow Will.Spencer on

Leave a Reply

Related Posts

  • How to Prevent Downloading of Your Entire Website

    Preventing Web Site Downloading Using robots.txt The first step is to disallow the downloading programs in your robots.txt file. To do this, you will need to define which bad robots you wish to disallow. Disallowing bad programs in robots.txt does not prevent all web site downloading, because many bad programs simply ignore the contents of [...]...


  • How to Add a Site Search Feature to Your Web Site

    A site search feature is an option to enable your web users to search your entire web site for the content they are looking for. The two general methods of implementing a site search are: Site Search Online Services Site Search Server Based Programs Site Search Online Services FreeFind is an online service that will [...]...


  • Where can I get Free Content for my web site?

    The Internet contains a significant amount of incredibly valuable information which you may freely use in your web sites to benefit your web site visitors. This content is covered under a wide variety of intellectual property laws. Some free content is placed entirely in the public domain, while other free content is released with a [...]...


  • Scraper Site

    A scraper site is a website that displays no original or usable information. This site is usually automated and its content automatically updated by bots crawling all over the web. All the content showed in a scraper site is taken without permission from other open-content websites and their webmasters. Unlike search engines, a scraper site [...]...


  • How to Choose the Best Keywords for my Site

    The best way to choose keywords for your site is to think about what prospective customers would type in if they were looking for your product or service. Sometimes our creativity needs a little boost. The Overture Search Term Suggestion Tool, Wordtracker, and the Google AdWords Keyword Tool can be that boost. These tools will [...]...