2

Most URLs on the web can begin with the www. part:

http://www.example.com

or without it:

http://example.com

But I remember I came across seeing something like this:

http://www2.example.com

I need to know what types of the www part of the URL exist besides the ones that I listed above?

c00000fd
  • 20,994
  • 29
  • 177
  • 400
  • 1
    There is no set list, it's completely arbitrary. – Oliver Charlesworth Sep 28 '14 at 01:20
  • @OliverCharlesworth: Oh wow, so some server can have `vvv` instead, hah? The reason I'm asking is because some servers automatically remove the `www` part. – c00000fd Sep 28 '14 at 01:23
  • @c00000fd: Yes, pretty much anything can be used as a prefix like this. In fact, there can be multiple prefixes. There's nothing stopping a site from being vvv.www.fff.tt.yyy.sfserg.fvvnvnviuiuef.g.example.com – David Sep 28 '14 at 01:25
  • @c00000fd: The TCP/IP protocols that transport HTTP traffic don't know or care about hostnames. – Zan Lynx Sep 28 '14 at 01:25

2 Answers2

2

You are talking about the third-level domain, typically called subdomain. In DNS speak it’s a label.

Such a DNS label can contain up to 63 characters, consisting of

  • a-z
  • A-Z (however, they are interpreted case-insensitive)
  • 0-9
  • -

(Internationalized domain name would allow for more characters, but technically the same character set is used, see Punycode.)

Using www is a very common convention, but in no way required.

A popular example with a different subdomain is Wikipedia. The English Wikipedia has the hostname en.wikipedia.org, i.e., they use en (in their case representing the language code for English) instead of www.

Because www is so common and many people add it to all URLs when typing them, websites typically adapt to it: either by providing both variants (with and without www), or by redirecting from one variant to the other. (The latter is usually preferred because having canonical URLs is useful for many reasons.)

Note that domains don’t have to stop at the third level, you can have more levels, like fifth.fourth.third.example.com. Some sites even use the www convention for such domains, so they’d add www to any domain, e.g. www.fifth.fourth.third.example.com.

unor
  • 92,415
  • 26
  • 211
  • 360
0

It is something you configure in the webserver. Commonly, they contain a different site or are alias to the main site, taking into account typos the users may make, but yes, it is arbitrary.

Manuel Alejandro
  • 588
  • 4
  • 13