[ Top | Up | Prev | Next | Map | Index ]

Analog 5.24: The domains file


The domains file tells analog which country is represented by each domain. You can tell analog where to find your domains file with a command like
DOMAINSFILE mydomains.tab
Normally you don't need this command, because if there is a domains file in your language, it should be selected automatically. But the DOMAINSFILE command can be useful if you want to use a domains file in a new language, for example. If the name of the file doesn't include a directory, it will be looked for wherever analog normally expects to find its language files.

You should have got a domains file with the program, but if you've lost it, you can download one from http://www.analog.cx/ukdom.tab. It should contain on each line a domain code, followed by a number, followed by its location, like this:

ad  2  Andorra
ae  3  United Arab Emirates
[...]
It does not need to be in alphabetical order, though humans may prefer it that way. Subdomains do not go in the domains file: you can list them in the Domain Report using the SUBDOMAIN command.
The number beside each domain represents how many levels deep an "organisation" is considered to be, for the purposes of the Organisation Report. For example, consider the hostname www.sta.ad. The organisation is sta.ad, at the second level, so Andorra has a 2 in the above list. But in the UAE, a host looks like www.economy.gov.ae. There is an extra level in the hierarchy, so the UAE has its organisations at level 3.

There are some problems with this. A few countries have organisations at both levels 2 and 3 (for example asaspace.at and univie.ac.at). In those cases I've favoured false negatives over false positives by using the bigger number. (Also there is a correction which will make most of them right again: the first component is always removed from a hostname of three or more components.) For other countries, I don't have enough information to tell what the level should be. I've just given those a 1. Do let me know if you have any more information, or corrections, for the numbers.

For numerical addresses, the organisation is considered to be at level 2 if the first component is 24, 61-68, 80-81 or 128-255; and otherwise at level 1. Again this is only an approximation -- for example, many organisations use two adjacent blocks of numbers, or subdivided blocks -- but it's the best we can do without looking up every address we come across. (Note that you can always see more detail using the SUBORG command).


Only domains which occur in the domains file will get their own line in the Domain Report: the rest are probably spurious, and will be accumulated together as "unknown domains". If analog couldn't find the domains file, then all the domains will be unknown. If you have debugging turned on, you can see which domains were unknown.

Lines starting with a hash (#) in the domains file are considered to be comments.


Go to the analog home page.

Stephen Turner
25 June 2002

Need help with analog? Use the analog-help mailing list.

[ Top | Up | Prev | Next | Map | Index ]