namedmanager icon indicating copy to clipboard operation
namedmanager copied to clipboard

Domain rename leaves junk NS records behind

Open thedaveCA opened this issue 5 years ago • 1 comments

Renaming a domain leaves some junk NS records behind that reference the original domain name.

Steps to reproduce:

  1. Create two nameservers (ns1.wonderfulhosting.example, ns2.wonderfulhosting.example)
  2. Create a domain called typodomain.example
  3. Notice the typo and rename to fixeddomain.example

The resulting zone file looks like this:

; Nameservers

fixeddomain.example.    86400 IN NS ns1.wonderfulhosting.example.
fixeddomain.example.    86400 IN NS ns2.wonderfulhosting.example.
typodomain.example      86400 IN NS ns1.wonderfulhosting.example.
typodomain.example      86400 IN NS ns2.wonderfulhosting.example.

This is relatively harmless since the records actually exist at typodomain.example.fixeddomain.example, but it is likely not what the user intended.

thedaveCA avatar Mar 01 '19 03:03 thedaveCA

One other interesting tidbit, in the database neither fixeddomain.example nor typodomain.example has a trailing dot, so I wonder if we couldn't simplify by replacing the NS records with @ instead? I'm not sure if there would be other side effects so I'm not prepared to make any changes to the code here myself.

thedaveCA avatar Mar 01 '19 04:03 thedaveCA