Resources: Code

Remove WWW from your URL

27 September 2012

Google recognises as a completely unique site from – so it makes sense (especially for search engine optimisation) to unify these urls.

Use this code in your .htaccess file to remove the www. Ensures search engines see the right site, and makes your url shorter! Boom!

RewriteCond %{HTTP_HOST} ^www.yourdomain\.co\.nz$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Tags: , , ,

Let's work together