Relaxation of the name-to-domain rules for CNAMEs

2007-08-23 - News - Chris Thompson

All names in the database have an associated domain whose value must be in a predefined table and is used to control user access. Until now, the domain has always been formed by stripping exactly one leading component from the name. This leads, for example, to the often unwelcome advice to use www-foo.dept.cam.ac.uk rather than www.foo.dept.cam.ac.uk.

We have tentative plans to restructure the database to liberalise this constraint everywhere, but this is a major undertaking and will not happen soon. However, we have been able to provide partial relief in the special case of CNAMEs.

In the table_ops page under object type cname there is now a field strip_components. This can be set to a number which controls how many leading components are stripped from the name value to convert it to a domain. (Note that it has no affect on the treatment of target_name.) For example, setting it to 2 for www.foo.dept.cam.ac.uk associates it with the domain dept.cam.ac.uk rather than the (probably non-existent) domain foo.dept.cam.ac.uk. Leaving the field null is equivalent to setting it to 1. (0 is an allowed value, but note that creating a CNAME dept.cam.ac.uk is disallowed if there is a mail domain with that name.)