To WWW or not to WWW

Found this today and thought I’d share ( Turns out there are some practical issues that I hadn’t thought of.

EDIT: Plus one of the original performance rules to reinforce the decision.

P.S. Eagerly awaiting Discourse :wink:

I was trying to decide which forum to post this under. SEO? But the practical issues being discussed aren’t really about search engines. Server configuration? But the implementation details for redirecting aren’t discussed either. General? I guess so… But it would have been nicer if I could have given it a variety of tags.

That’s probably the first good content article on the subject that I have ever seen, nice find.

Interesting. I’ve always seen the www as redundant (an odd mistake from the web’s beginnings, which I thought even Berners-Lee regretted). Perhaps the point is just to have a subdomain, rather than specifically www? Most of that was over my head, anyhow.

That’s what I understood as well. The subdomain could be “main” or “primary” or “content” (or “www”) or whatever, so that cookies can be isolated to just that subdomain, among other reasons.

I didn’t understand a word of that, and as far as I can tell, absolutely none of what the article said is remotely relevant to my website…

I never notice any difference to be honest. Haven’t seen much discussion on this topic. So if you have website with www, then keep it with www , if you have without it, keep it without. :slight_smile:

The www was initially supposed to be a server identifier so that if the same site was being served from multiple servers then internally they’d be www1, www2 etc and the www would simply refer to the closest one.

I haven’t seen anywhere that implements www as anthing other than just another sub-domain name though.

Can’t say I’m buying what was said in the article.

A domain is a domain. A subdomain doesn’t “default” to the primary domain unless you add an htaccess rule that does that.

DNS records don’t have to live on the same server as the website either. All you need is an A record pointing to your host’s IP, and that’s it. Additionally, a primary domain can have a CNAME record–but since the author says no, I’m guessing that not all registrars have the feature available.

That’s correct. You would still want a redirect from the naked domain to the www subdomain.

I don’t see where anyone said differently. :confused:

No one’s saying that option is broken, but just that keeping your site and content behind a CNAME record comes with advantages. For example, if you’re behind a CDN service such as Akamai, then they won’t have to hardcode your host’s IP into their service.

That would be strange indeed if the same naked domain could have both an A record with an IP address and a CNAME record with an alias to somewhere else. Which result, then, would be returned? I suspect we’re either having a communication breakdown over terminology, or your host is doing something different than what you think, such as, perhaps, they’re creating a 301 redirect for you.

The only time I ever noticed a difference is when I was doing a Flash game for college 4-5 years ago and the week before the I was to turn it it the game won’t work all the sudden. I didn’t change a darn thing and I almost start rewriting when I notice when I went to the website I didn’t put a www in front. I put a www in front and tada the Flash game worked like a charm. I made sure to inform my instructor to put a www in front in the write-up that I handed in along with the files. Needless to say I don’t think I have to worry about that since Flash is practically dead for the most part, but I still keep a look out in other applications that I write.

[ot] I recently had a lovely bug when trying to use images on a sub-domain PHP drag&drop thumbnailer program.

The coding script foolishly omitted the www prefix. The PHP script complained bitterly and threw errors regarding missing files. The image link without the www displayed OK in the browser due to .htaccess adding the www.

It took quite some time to find and correct the img src URL :frowning:

Also got caught out with $_SERVER[‘SERVER_NAME’] not showing www but does show the subdomain. $_SERVER[‘DOCUMENT_ROOT’] has similar results.

Most confusing :frowning:


I have seen some registrars that do have that option but most of the time when I need to create a CNAME or similar, I use my hosting provider tools.

Either we use www or without www what’s the impact it has on SEO? and can be different pages. You should have both to make sure that all your SEO efforts are directed to the right page :slight_smile:

In SEO terms, the recommendation is to choose one or the other, as having both means that the SEO value will be shared between them, which dilutes the value of each. So, choose one and then redirect the other to that (via htaccess etc.).

Again, in terms of SEO, it doesn’t seem to matter which you choose.

I dont think it would matter which one you choose the www or the nonwww its just a matter of personal preference in my opinion. Just make sure you redirect the the one you choose so you wont have a duplicate website.

This thread seems to have strayed way off topic. The orioginal post was pointing out a difference that using www can have with regard to cookies and other configuration aspects where using www makes a difference. So it is an established fact from that post that the choice CAN make a difference. So it certainly isn’t a matter of personal preference if any of the issues the article that post references apply.


If you are using this issue then why you are not using Canonical tags

The canonical tag has no effect on the scope of cookies whatsoever - it is irrelevant to cookie processing.

Whether your canonical page has www or doesn’t have www does affect the scope of cookies and so does affect whether you should select the www or non-www version as your canonical page.

That you are already redirecting to one or the other is one of the assumptions that precedes the topic being discussed.