WWW vs non WWW — What's the best practice? I n

2019-06-24 11:36发布

Should my site be a www or non-www address? This is a pretty basic question. I wanted to see what people consider to be the best practice here. The reason I have to pick is I need to buy an SSL certificate for one or the other. Of course I can redirect to the one I pick on the back-end and the technicals are not a problem, but are there any opinions on which to pick and why?

4条回答
不美不萌又怎样
2楼-- · 2019-06-24 12:39

My vote is for the shorter one. Comparing your question to writing for the web, and writing in general - strive for maximum salience in the fewest words possible. 4 saved bytes can come in handy with 3rd party services like Twitter.

查看更多
老娘就宠你
3楼-- · 2019-06-24 12:40

Id answer both? Some sellers will offer both as standard. I believe Go Daddy offer the service help topic below.

http://help.godaddy.com/topic/234/article/850

查看更多
贼婆χ
4楼-- · 2019-06-24 12:41

The host name is essentially a convenience for your users to remember the name. From this point of view, it's mainly a marketing decision. If you've promoted example.com use that, if you've promoted www.example.com use that.

Redirections on the back-end as you seem to suggest don't sound like a good idea. The point of the certificate is to let your user be able to verify the identity of your server. If you only have example.com and if they try www.example.com over HTTPS, they'll first get a warning about an invalid certificate (thus they shouldn't follow the redirection).

You may be able to get both. Some CAs issue certificates that have SANs for example.com and www.example.com (sometimes for the same price or a little bit more, I think).

查看更多
▲ chillily
5楼-- · 2019-06-24 12:41

SSL certs support multiple names and also support wildcard pattern matching. I would add 2 names to the cert; you don't need to choose just one.

Consider adding the two patterns site.com and *.site.com to cover you, if you need to use an additional hostname / subdomain in the future.

Please note that both are needed if you wish to access the server as site.com, as the name site.com does not match the pattern *.site.com

查看更多
登录 后发表回答