If we try to access www.mail.google.com or www.music.youtube.com. They wouldn't work. why? Also if we want how can this be achieved
-
4Because nobody created those DNS records. They didn't deem them necessary.– Gerald SchneiderCommented Dec 9, 2021 at 9:22
-
Or/and because nobody added those names into virtual hosts on the web server that serve related applications. For what you need this?– Nikita KipriyanovCommented Dec 9, 2021 at 9:37
1 Answer
Why would they?
www
is nothing special. It is just one string (name, label) among any other combination, for computers it makes no difference. And not all hostnames have to start with this prefix.
When the World Wide Web was invented, it was custom to name website with hostnames starting with www.
just to more easily distinguish them from other hostnames, like those of an FTP server starting with ftp.
or an SMTP/POP/IMAP server starting with mail.
, etc.
Also if we want how can this be achieved
The owner of the zone has to create the relevant DNS records if the names need to resolve. But given the names you used as example - which are obviously not yours -, why are you concerned?
-
needs to implement the same i.e. need to redirect requests from www to non www. Also checked that www.drive.google.com works but www.mail.google.com doesn't. why so? Commented Dec 9, 2021 at 14:55
-
Because someone in Google just didn't make the DNS entries for it. And they did for
www.mail.google.com
. No one here will be able to answer that question, you'd have to ask Google.– mtakCommented Dec 9, 2021 at 15:00 -
1@kannuchopra "needs to implement the same i.e. need to redirect requests from www to non www." Then you should post that as question, with your own specific details, instead of wondering why others did their setup in one way or another. But better, do search first the various SE sites because there are already millions of questions about "redirections". Commented Dec 9, 2021 at 15:40
-
1@kannuchopra "Also checked that www.drive.google.com works but www.mail.google.com doesn't. why so?" Why not? Each owner of a name is free to have, or not, whatever names it wants below it, so why are you trying to infer anything special about a specific name existing or not? Commented Dec 9, 2021 at 15:41