Little Question about Second Level Domains

markus

Verified User
Joined
Nov 7, 2004
Messages
134
Location
Girona, Catalunya
I don't know where to ask this question. Sorry if I'm breaking any rules. I've been trying to search on several RFCs without success.

Motivation:

I wrote a little PHP program to collect information (and then create simple statistics) about HTTP referers. I added some basic verifications to what is being passed in the HTTP headers, to prevent SQL injection, etc.

According to RFCs 1034 and 1035, the maximum length for a domain name is 255, a domain label must only contain alphanumeric chars or hyphens (but it must begin with a letter and it can't be finnished with a hyphen), its maximum legth is 63. However, I would like to extend these verifications to perform some semantical checks. For instance, I've the idea to verify top level domains, so they should be one of a known list of strings (com, edu, gov, org, mil, info, museum, name, uk, ca, etc, etc, etc.).

I'll try to also deal with IDNs (Internationalized Domain Names, RFC3490, etc), but this is another subject.


Here's my problem:

Some top level domains for countries use a second level domain which is somehow generic. For instance: co.uk

I'm wondering if there are any rules (RFC) that affect that kind of second level domains?

Maybe someone here could point me in the right direction.


Thanks a lot for any suggestion you may provide :)
 
Anything is ontopic in an offtopic forum :) .

The answer is that the folk responsible for the top-level domain get to decide whatever they want under that domain. It's theirs.

Look at ".name" for example.

Or what ".us" used to look like before it became commercial.

Unfortunately I can't remember where I found it; probably in an ancient O'Reilly Internet tome.

And I'm sure it's in the RFCs, but I have no idea where.

Jeff
 
Back
Top