1

This question already has an answer here:

tl;dr : For SEO, should I redirect from one to the other or list both on the DNS records?


It seems that most experts think that both www and non-www should exist. (Please correct me if I'm wrong.) And Google Webmasters Tools lets you choose which is the main one.

But: will a redirect give all SEO weight to one of them instead of splitting it? (There are other search engines after all, so setting the main one in Google Webmasters Tools might not be enough.) Will having both on the DNS records give them more importance? No difference?

marked as duplicate by MrWhite, John Conde Apr 21 '15 at 18:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

It is a nicety that both www and non-www forms of a site exist. However, it is better for search that this does not happen.

It is better that one 301 redirect to the other.

The reason for this is simple and two fold: one, no duplicate content; and two, search metrics/prowess is not divided over the two.

It is far better to have one site that performs well in search. Tradition is that the www sub-domain is used to indicate a world wide website. I always recommend redirecting using a blanket 301 redirect from the parent domain example.com to the sub-domain www.example.com. People expect it.

Here is some example code for Apache .htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

Of course if you use HTTPS, you would change the RewriteRule from http to https. As well, change example.com to your domain name.

  • How would this be accomplished? By setting the DNS of both to the same url and having the server (It's IIS Windows Server 2012) "fix" every www to non-www? (or the other way around, depending on which one I want shown) – ispiro Apr 21 '15 at 18:04
  • @ispiro I added Apache example code to the answer. I do not know IIS well enough to give example code. – closetnoc Apr 21 '15 at 18:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.