Contents[Hide]

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:

1. Add www to URL

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

2. 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.

Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top