Having www in URL of your webpages is not a necessary. It is matter of choice. Most of the internet users are still typing www in from of every domain they enter into they web browser. By use of apache's .htaccess file yuo can force your URL to contain www or you can remove www completely. Here is a way how to add www to your URL. Edit your .htaccess file:

Add www to URL

RewriteEngine On
RewriteCond %{HTTP_HOST} ^linuxconfig.org$
RewriteRule (.*) http://www.linuxconfig.org$1 [R=301]

Remove www from URL

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.linuxconfig.org$ [NC]
RewriteRule ^(.*)$ http://linuxconfig.org/$1 [R=301,L]

In both cases replace domain name with your website's domain name.

When you are done make sure that you test both URL versions. Both of them should work but only one will be rewritten.

Please refer all article related questions to:

You may also be interested in: