Knowledgebase

Portal Home > Knowledgebase > Articles Database > Changing hostname/nameservers


Changing hostname/nameservers




Posted by Daniel B, 04-03-2013, 09:08 AM
I have a server that I would like to change to a different domain to rebrand it. I've never actually done it before so I wanted to post the steps I am planning to take...would love if someone could check over them for me and let me know if I'm missing anything? Change hostname in WHMChange hostname in /etc/sysconfig/networkfileDelete hostname A RecordCreate new hostname A RecordChange/add nameservers in WHM setupChange/add nameservers to /etc/nameserveripsDelete nameserver A RecordsCreate new nameserver A RecordsManually update A Records/nameservers for all existing accounts (is there a way to automate this?)Restart DNS Servercreate new host records at registrar for new host domain Step 9 is one of my concerns. Right now, the hostname and ns1 share an IP, ns2 is a separate IP, and then the accounts share the same IP as the hostname and ns1. What I want to do is have the hostname and ns1 share the same IP, a new IP for ns2, and then a dedicated IP for the shared accounts. I'm going to use separate IPs for all this than the ones currently being use to make sure there are no conflicts...hopefully step 9 will work to do that.

Posted by ServSilla, 04-03-2013, 10:52 AM
Unfortunately there is no way to automate this as all the domains have there nameservers and a records edited within there name registrar's account not cPanel/WHM..etc. If you need any help feel free to shoot me a message and I will help as best as I can.

Posted by Daniel B, 04-03-2013, 11:02 AM
The automation I was asking about is for the A records within whm. I own all the domains in question so the registrar part is easy. It's changing them all to point at the new shared account ip address and changing that ip in all the dns zones I was wondering about. Do I have to manually do that, or will it automatically do it when I update the nameservers. Automation isn't required, just figured I'd see if there was a way to do that part of it.

Posted by Daniel B, 04-04-2013, 06:01 AM
Anyone else? Do those steps look correct?

Posted by foobic, 04-04-2013, 06:28 AM
So you're keeping the same IP addresses and just changing the hostname and nameserver domain? If so, why not create the new nameservers in addition to your existing ones? You could then switch each hosted domain to the new nameservers one at a time, checking as you go. (The hostname change shouldn't matter.) For automating the zone file changes you could write a sed script or just download them and search-replace in your favourite editor (but it may not be not worth it unless you have a lot of hosted domains).

Posted by Daniel B, 04-04-2013, 07:42 AM
The websites on the server are all still in development so it isn't going to hurt anything to just remove the old nameservers and add the new ones. I am probably going to use new IPs for everything though.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language:

Contact us