Is there a limit for number of subdomains like "*.domain.com"?
-
The only limit is when your name server runs out of memory. It's the same as the limit for the number of subdomains like *.com: 253 characters, total.– derobertSep 15, 2009 at 7:01
-
Are you asking about no of subdomains that can be created for particular domain ?– MRGSep 15, 2009 at 7:01
-
ops.ietf.org/lists/namedroppers/namedroppers.2003/msg00964.html if you want a reference– derobertSep 15, 2009 at 7:03
2 Answers
The limit would be dependant upon the DNS server, not the webserver. BIND allows for 16777216. Microsoft DNS is said to be stable to 20K objects per zone. Regardless, Peter is correct. It is too large to matter unless you are doing something non-standard.
To clarify, the longest domain name possible is 255 characters with no label (peice between dots) to be longer than 63 characters per DNS spec.
-
7You can easily do
*.domain.com IN A 10.11.12.13
and then the limit is on the webserver. If you're going to have millions, this is probably the only sane way (e.g., think of a site that lets you set up blogname.site.come, for example)– derobertSep 15, 2009 at 7:06 -
In that event, I would argue that the issue would still not lie with the web server. If the server were serving static content, perhaps there could be an issue, but in all likelihood, with that many domains, the script running on the server could just examine the request string and parse out the relevant portion of the domain to determine the content to show.– MitchAug 21, 2012 at 2:13
The only limit is the length of the URL - the subdomains are interpreted by the webserver. (And that means there's no relevant limit, by the way - the number is just too huge.)
EDIT: the maximum length of the URL is 253 octets, or 253 characters if using ascii. That's plenty :)
-
then what's the limit of the length of the URL?– ShoreSep 15, 2009 at 6:58
-
1It's starting to sound like Homework, some random trivia question thrown by a bored prof. Sep 15, 2009 at 7:03
-
It is a DNS limitation. vhosts are not relevant to his question. Sep 15, 2009 at 7:04
-
Depends on your browser, the server, etc. IE has a limit of 2083 characters in the URL, afair. RFC 2616 advises not to rely on URIs above the length of 255 characters.– JoeySep 15, 2009 at 7:06
-
But there is no limit for the URL... The standard, RFC 2616, says "The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. [...] Note: Servers ought to be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations might not properly support these lengths." Sep 17, 2009 at 9:35