7

After asking this question:

https://stackoverflow.com/questions/8042748/facebook-login-returns-error-message-if-domain-accessed-without-www-prefix

I was told that using example.com and www.example.com at the same time is wrong and, to cite the answer "You will end up with all sorts of problems".

What kind of problems are those? The thing is the new company I work for does the same mistake and I'd like to explain them it's wrong and why but for now Facebook login (which they don't use) and Google Analytics statistics mess I had to fix (4k selfreferrals a day) are the only reasons I know.

0

1 Answer 1

11

The answer when you asked on your original question was:

Cookies are split and/or duplicated. SSL doesn't work. Inbound links aren't consistent

The main thing to understand is that although www.domain.com and domain.com may display the same site, they don't have to, so are treated as separate sites.

In detail

Cookies are split and/or duplicated

Your users will end up with cookies for the domain.com and www.domain.com which may be different, depending on what you store in them. So, for example, if your website displays different content according to what's in the cookie then they'll see different things according to whether they're using www.domain.com or domain.com to access your site.

SSL doesn't work.

I think they mean, if you have an SSL certificate for domain.com then if people use www.domain.com then that certificate won't work (you'll have to get another one, or pay more for a wildcard one).

Inbound links aren't consistent.

Links could put to either version, so diluting the effect of the links - it looks like people are linking to two different sites. You could also be penalised for having duplicate content on two "different" sites.

3
  • This is all true, but just to add, search engines are pretty smart with domain.com/page vs www.domain.com/page, especially when they contain the same content. You can set a preferred domain in Google Webmaster Tools if redirection is too much effort. Dec 21, 2011 at 23:39
  • 1
    Google isn't where it's all at. Does Bing allow for preferred domain settings? It's best to set up the redirection in .htaccess for other search engines. We get quite a bit of traffic from Yandex. Dec 23, 2011 at 2:51
  • Bing? What's that? Dec 27, 2011 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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