Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A client's website is currently at www.domain.com, with domain.com redirected there automatically. I've suggested that they reverse the redirection to drop the "www", so I can set up a subdomain that can use shared session cookies (= login to domain.com stays logged in at sub.domain.com). However, they're concerned that the change will impact their search engine rankings. Any advice?

share|improve this question
You can set (and use) the naked domain as the cookie domain without redirecting HTTP requests - there is no need to switch. – danlefree Feb 14 '13 at 13:41
up vote 6 down vote accepted

First of all, as you're mentioned the reason to change that are cookies - there's no need - see "sub-domain cookies, sent in a parent domain request" on Stackoverflow:

The leading dot in the domain value .example.com means example.com and its sub-domains. Without the leading dot, the cookie is only valid for this specific domain.

Note that when setting a cookie, domain values without a leading dot will be prepended with a dot. Only when the domain parameter is not set the user agent assumes the current domain for that cookie.

SEO-wise: If you go with "www." or without is not important, as long as you 301-redirect from the one to the intended one and all webmaster tools know what your intended domain is. BUT: If you would change this in an existing project, keep in mind the already existing backlinks and if it's worth to redirect them and possibly lose some link juice.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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