Personally I use the .htaccess method. This is an excerpt from a site that instructs you how to do that.
Quote:
|
Originally Posted by http://no-www.org
Class B means that all of the traffic to http://www.yourdomain.com is politely and silently redirected to http://yourdomain.com. This is currently the preferred no-www classification as it does not inconvenience your users, but it does assert the deprecated nature of the www subdomain.
The process of making your domain a Class B is quite simple. All you need to do is create or modify a file called .htaccess located in the root directory of your site and add the following lines, changing the red text to match your domain.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\. domain\.com$ [NC]
RewriteRule ^(.*)$ http:// domain.com/$1 [R=301,L]
|
In other words, in the root folder of your site make a file called
.htaccess (open up notepad & type in this code then save it as .htaccess without the .txt) & inside the file put this:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.tellhim\.net$ [NC]
RewriteRule ^(.*)$ http://tellhim.net/$1 [R=301,L]