02-08-2018 09:55 AM
I have a lot of host records of the form:
as well as some CNAMEs that look like
smile.example.com CNAME smile.blah.example.com
frown.example.com CNAME frown.blah.example.com
etc. blah.example.com is not actually a proper
subdomain. The host part on these records is
actually www.blah and smile.blah.
What we'd like to do is create a proper subdomain
blah.ucsc.edu. The question is, what is the easiest
way to proceed? I assume I will not be able to create
the subdomain as long as the above records exist,
so presumably they have to all be deleted and then
readded. I'm guessing reconstituting the records using
a CSV that has been modified to account for the new
subdomain would be a good way to accomplish this.
Is there some other approach that would be simpler
or less disruptive (since deleting records means DNS
stops working for this stuff until the records are put
back in place)?
Thanks in advance for any advice,
Solved! Go to Solution.
02-12-2018 02:16 PM - edited 02-12-2018 02:46 PM
Subdomains can be created at any time without impacting existing services, though they won't start serving until services are restarted. Records in existing zones that fall under the new zone will be automatically reparented for you, with the one exception that per the DNS specification (RFC), CNAME records cannot share the same name as the zone name.
02-12-2018 02:35 PM
I just tested this scenario where I:
1. Created an auth domain called example.com
2. Populated with an A record called smile.blah.example.com and a CNAME pointing to said record called smile.example.com
3. I ran a script to continuously dig the above two records
4. Created a subdomain called blah.example.com
5. As soon as I did this (before even hitting the restart services button) the dig responses failed (which I find odd as it should not do this). After hitting the restart services it started to resolve queries again within 2-5 seconds.
The end result:
- Creating the subdomain subsumed and auto-created/moved the smile.blah.example.com record under the blah.example.com subdomain. The A record effectively became "smile" under the blah.example.com domain.
- The CNAME smile.example.com obviously remained in the parent domain "example.com" and still points to "smile.blah.example.com", which works just as it should.
- There will be a brief outage when creating the new subdomain, until services restart. So you will want to do this after hours obviously
- If you have a lot of these changes to make you'll probably want to automate this via CSV and/or scripts to auto-service restart
- You should consider downstream name servers that cache your previous response. Assuming the target IPs haven't changed, I can't think of any adverse effects this might have.
Hope this helps.
03-12-2018 10:31 AM
Sorry for the lag in responding on this. Thanks to you both for the response, and I tremendously appreciate the time and energy you (Jasper) spent in responding to this. Very, very helpful!