问题原文
原帖链接 · Shy · CC BY-SA 4.0
For a website, e.g. example.co.uk, when I write it in the URL bar of browser, it takes me to the URL https://example.co.uk.
When I enumerate the subdomains of the website, I get subdomains like www.example.co.uk, kneal.example.co.uk, www.kneal.example.co.uk, sink.example.co.uk, www.sink.example.co.uk etc.
When I visit e.g. kneal.example.co.uk and www.kneal.example.co.uk in the browser, I see the same webpage. I have been observing it for a while and this is always the case.
When I perform vulnerability assessment scans on e.g. sink.example.co.uk and www.sink.example.co.uk, I get the exact same vulnerabilities. Even if I perform a site-structure enumeration of the website, I see the exact same site-structure. I have been observing it for a while and this is always the case.
Are subdomains of websites that start with www., same thing (with two different names - one starting with www. and one starting without www.) as those subdomains which do not start with www.?
If so (that is if they are not different), why do I get both something.example.co.uk and www.something.example.co.uk when enumerating example.co.uk?
已采纳解答
原帖链接 · Jasmijn · CC BY-SA 4.0
Subdomains named www (for World Wide Web) are not special compared to other subdomains. That is, there is no mechanical reason for a domain to be named www.example.com instead of hello.example.com. Both of them are simply subdomains of example.com, which is a subdomain of the top-level domain com. Each of them could resolve to the same or to different servers, depending on their DNS entries. And, since the HTTP protocol requires browsers to use the Host header, to let servers know through which domain name they were accessed, servers can freely choose to serve the same or different content.
It is generally accepted to use either example.com or www.example.com as your official domain name, and have the other automatically redirect to the equivalent page with the domain name changed. Other subdomains usually serve different content, like that for a sub-organisation, for a specific user (like how Tumblr serves Neil Gaiman's blog on neil-gaiman.tumblr.com) or for different communities (like Stack Overflow), but they don't have to.
And since subdomains can have subdomains of their own, website owners could decide that they'd prefer to use www.specific-subdomain.example.com over specific-subdomain.example.com, but that's not fundamentally different from the choice to have something like incredibly.nested.specific-subdomain.example.com.
So the answer to your question is domains with www. and without www. are not the same. Unless the server is configured to make it the same.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
