Ask HN: Add “www.” to my domain, or not?

16 points by _dt47 ↗ HN
Old question, but I would like to hear what you have been doing with your projects lately.

Any thoughts?

14 comments

[ 3.9 ms ] story [ 40.5 ms ] thread
Personally I've been ditching the www but either is fine. Pick one and stick with it, don't mix and match. Always use https.
Also, redirect one to the other.
I add it, but redirect away from it. Some users have it engrained to add the www.* to everything, giving them a DNS error isn't ideal.
The main reason to use www is because you can't CNAME a apex domain, but you can on a subdomain. Sometimes this matters - and other times it doesn't. For my day job at an internet hosting company, we use www for our clients so we can CNAME their locations.
I came here to say exactly this.

One of the main use cases to need a CNAME is if you use a Global Traffic Manager (DNS-based failover?).

I use www for the canonical domain and redirect the bare domain to the www version.
Yes,it's simple enough to add to the DNS and have both. Many of the everyday users I've worked with seem to want to add it to all the browser urls they type in. It doesn't matter if the original has it or not.
Your DNS should always have both that go to the same httpd, or is this a question about advertising, business cards etc?
If your TLD is recognisable (e.g. .com, .net, .org) then no need - people will recognise it as a domain.

However, if you've got a new-fangled TLD (.recipies, .shoes, etc) then use 'www' - without context, people aren't going to recognise [redacted] as a URL, but they will recognise [redacted] as one.

Why not just use both and have them host the same things?

It's what I do. example.com www.example.com

They both host the same thing and have the same TLS cert.

Do you redirect to one, or have both as their own thing? I thought for SEO you wanted to have one or the other, with a redirect in place for the one that you don't consider your canonical domain?
If you type any word in Chrome/FF and press Ctrl+Enter, they automatically prefix "www." and suffix ".com". It's a shortcut a lot of users have got used to by now. So, at the very least, make sure www doesn't give a 404. I set up DNS to redirect my main domains to their www.
I personally use www. simply for the symmetry. To me, www.bugmuncher.com looks a lot nicer than just bugmuncher.com