Resources: Linux and Apache

Removing www from your site

26 July 2013

Personally I prefer web URL's to exclude www, and so I implement the following code on all project's .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Another reason this is important is that and are treated as two unique websites. Any SEO rankings for does not apply to!

Tags: , , ,

Let's work together