DNS glue records are not necessary and you can avoid them by exploiting registry bugs

When you configure an authoritative nameserver ns.tld1 for a domain site.tld2, the registry for tld2 tries to require that a glue record exists for ns.tld1. A glue record is a nice optimization, but it's not actually required if ns.tld1 is not its own authoritative nameserver, so this is an annoying limitation. Fortunately, we can hack around this: the registries don't talk to each other, so if tld1 and tld2 are at different registries we can configure an authoritative nameserver without supplying a glue record.

I want to avoid supplying a glue record for my authoritative nameserver because:

These are both very bad for hosting a nameserver on a dynamic IP address, which I want to do. I want to host a nameserver on a dynamic IP address because I host everything on a single computer, and that computer has a dynamic IP address.

To avoid a glue record, the nameserver needs to be under a domain for which it is not authoritative. In my case that domain is birdns.org, and it contains just one record, an A record for ns1.birdns.org. Some random third-party DNS server is authoritative for birdns.org and serves that A record, and my computer updates that record using ddclient whenever my IP changes.

Ideally, I can then configure ns1.birdns.org as the authoritative nameserver for all my other domains. In reality, if I try to configure it as the authoritative nameserver for catern.org or any other org domain, my registrar will return a useless "There was an error, please try again." message. This is because a single registry (Public Internet Registry) handles all of org, and they require unnecessary glue records when configuring authoritative nameservers for their own domains.

I think this error happens because of the structure of the Extensible Provisioning Protocol (EPP), the protocol that registrars (like Namecheap) use to communicate with the domain name registries. RFC5731 says:

A host name object can be created in a repository for which no superordinate domain name object exists. For example, host name "ns1.example.com" can be created in the ".example" repository so that DNS domains in ".example" can be delegated to the host. Such hosts are described as "external" hosts in this specification since the name of the host does not belong to the namespace of the repository in which the host is being used for delegation purposes.

Whether a host is external or internal relates to the repository in which the host is being used for delegation purposes. [...]

Name server hosts for domain delegation can be specified [...] as references to existing host objects.

This is vague and overcomplicated, but basically it's saying that an authoritative nameserver for a domain is configured as a reference to a "host object", which (according to RFC5732) is a domain name with an optional IP address. If that domain name is managed by the registry containing the host object, it's an "internal host object"; otherwise, it's an "external host object".

I suspect what's happening is that the registry software requires an IP address be present for all "internal host objects", but allow "external host objects" to not have an IP address. So if the registrar tries to create an host object without an IP address, and that host object ends up being internal, the registry rejects it. Passing this requirement through several layers of abstraction, I get an API failure from the registrar.

As far as I know, there's no way around this. But fortunately, Public Internet Registry only manages org domains, so if I keep my nameserver on an org domain it will be an "external host object" for every other TLD, and I won't have to supply an IP address and create a glue record. I don't really need to host org domains anyway.