views:

554

answers:

2

What are technical/programming/non-SEO pros and cons of www or no-www, for domains as well as sub-domains?

From Jeff Atwood's twitter at http://twitter.com/codinghorror/status/1637428313 :
"sort of regretting the no-www choice because it causes full cookie submission to ALL subdomains. :("
What does this mean? Is there a blog post or article detailing this?

What other specific issues and their reasons should be considered for www. vs no-www.

Update:
On searching for more info on this topic, I found following helpful ( in addition to Laurence Gonsalves answer ) :

+7  A: 

Cookies are, by default, restricted to the host of the URL they were set on. So cookies set on "http://example.com/foo.html" can be seen by other pages on "example.com" but not pages on other hosts -- not even subdomains.

It is possible to set a domain attribute for a cookie which can make it visible to more hosts. This domain attribute must start with a dot and must be a suffix of the hostname of the page setting the cookie. Cookies set with a domain attribute are (potentially) visible to pages on hosts for which the domain attribute is a suffix. So if a cookie's domain attribute is ".example.com" it'll be visible on "www.example.com", "forums.example.com", "foo.bar.example.com" but not "example.com". So if you serve part of your site from "example.com" you can't make cookies that are visible to subdomains, but if you always use subdomains then you can make cookies that all subdomains can see.

You can find a very detailed but somewhat hard to read explanation of this in RFC2965. I also found a websiteGear article which has a pretty clear explanation.

Laurence Gonsalves
A: 

I have a question to add, not an answer. Hope this is Ok. My site is coming up under some keywords with the www. and others without. It is a PR2 either way however, my Seoquake tool shows that google is counting more links in the non www. form. I would like to combine the two and get the link juice from both to go to the non www version. Is this as simple as a 301 redirect or would another method be better.

John Ray