What would be the best way to redirect my non-www urls to www url in my site.
I think they are being redirected with a 301 redirect now but traffic that is being sent to my non-www is not tracked properly with google analytics. So I guess it's not configured properly.
Hope someone can help.
Thanks
A non-www to www can be done using Apache Rewrite Engine and htaccess file. Create a .htaccess file in your public html directory with following content..
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.youraddress.com$ [NC]
RewriteRule ^(.*)$ http://www.youraddress.com/$1 [R=301,L]