Forum Moderators: phranque
Neither www nor non-www is better for SEO -- It mkaes no difference.
What can make a difference is that you should only use one and link to that one.
There are hundreds of examples of that code paosted here, so I won't repeat it. Try a search for "RewriteRule www non-www domain RewriteCond HTTP_HOST"
Jim