The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Changing DNS. Oh what a mess I make

Discussion in 'Bind / DNS / Nameserver Issues' started by stevethemusicma, Jun 5, 2015.

  1. stevethemusicma

    Joined:
    Mar 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi All,

    I have a question for the group. I have a GoDaddy server with about a 30 sites on it. I’ll call the DNS for this ns1.GodaddyDNS.net and ns2.GodaddyDNS.net

    I now have the same exact type of server (both with cPanel/WHM) at Amazon I’ll call ns1.AmazonDNS.net and ns2.AmazonDNS.net

    Most of the domains are mine so I just transferred the sites and changed the DNS with my registrar and they are working fine. There are about 8 or so domains that I cannot change without notifying the owners to change their DNS.

    ns1.OriginalDNS.net and ns2.OriginalDNS.net pointing to the old server’s IP. When the first move happened I changed so that not only were ns1.GoDaddyDNS.net and ns2.GoDaddyDNS.net pointing to the GoDaddy IP’s. I pointed ns1.OriginalDNS.net and ns2.OriginalDNS.net and pointed them to the GoDaddy IP.

    So at the end I had users that used OriginalDNS and GoDaddyDNS and everything worked fine. Now on the Amazon server I have ns1.AmazonDNS.net and ns2.AmazonDNS.net pointing to the Amazon IP’s.

    I wondering if I can do the following (as long as the domains aren’t being worked on).

    1. Transfer the sites using WHM
    2. Go into ns1.OriginalDNS.net and ns2.OriginalDNS.net and change to the Amazon IP
    3. GO into ns1.GoDaddyDNS.net and ns2.GoDaddyDNS.net and change to the Amazon IP.
    4. Of course leave the ns1.AmazonDNS.net and ns2.AmazonDNS.net alone.
    I know it will take time but will all of these sites start to use the Amazon IP’s for resolution? I’m pretty sure that this will be the right way to do it but I figured I’d ask the experts here.

    Thanks,

    Steve
     
  2. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    That sounds right to me... Nameservers are simply records pointing to a server... For example:

    Code:
    ns1.domain.com > 1.2.3.4
    ns2.domain.com > 4.3.2.1
    
    As long as those IP's are pointing to your Amazon service, the domains will resolve to the DNS server on said service. Remember that the domains also must have their respective A records pointing to the service.
     
  3. stevethemusicma

    Joined:
    Mar 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    The A records will change automatically when I transfer their site over to AWS using WHM/cPanel right?

    thanks,
    Steve
     
  4. stevethemusicma

    Joined:
    Mar 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    And thank you so much for you answer :)

    Steve
     
  5. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Nope, that's not quite right. The Nameservers point to DNS servers. The DNS servers are what hold the A record...

    If the Nameservers are pointing to your Amazon service, you will then need a DNS server with zone files for each domain.

    An example A record for domain.com and a CNAME to make www.domain.com work:

    Code:
    domain.com 14400 IN A     1.2.3.4
    www        14400 IN CNAME domain.com
    
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    I've just read your last again. If you are using the cPanel transfer tools, it should make the relevant changes in the DNS zone files for you. But it's always best to check after!
     
  8. stevethemusicma

    Joined:
    Mar 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I'm pretty sure I understand. I just have to make sure that the SOA has the right domain.com in it the CNAME's must have the right domain name and all the A records except for localhost should have the new IP.

    I'm pretty sure when I transferred some of them it came in automatically but I could be brain dead and I actually might have changed them. The ones I transferred when I first got the AWS have the right zones in the zone file. I believe that the only one I changed manually was the domain on AWS that I used as the new DNS server. for the first move all I did in the registrar's host entries is to change the original IP's to the new Godaddy IP's and create the new host (DNS on the AWS) with the AWS IP.

    I hope I'm saying this right but I'm pretty sure I understand. This thread of mine sounds like who's on first, what's on second etc :)

    Thanks,
    Steve
     
  9. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi Steve,

    This is exactly what the forums are for!

    As long as in all zone files (/var/named/) have had the old IP replaced with the new one and the nameservers point to your new server, you should be all set in respect to DNS :)
     
  10. stevethemusicma

    Joined:
    Mar 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    thanks so much for your help.

    Steve
     
  11. stevethemusicma

    Joined:
    Mar 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I did the transfer yesterday and then changed the hostname DNS's for the older DNS servers and within a few minutes everything resolved OK. Of course this is on Comcast's network. I'm going to give it another 3 days until I shut down the old server but first suspending the sites for a day and then actually shutting it down.

    Thanks for your support,
    Steve
     
  12. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Glad to hear everything is going great, Steve!

    I'll keep an eye on this thread in case of any more DNS questions.
     
  13. stevethemusicma

    Joined:
    Mar 16, 2008
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I do have one other question please. All the domains that were transferred have a TXT entry in /var/named of

    domainname.com. IN TXT "v=spf1 ip4:NewIP.NewIP.NewIP.NewIP+a +mx +ip4:OldIP.OldIP.OldIP.OldIP~all"

    Should the old ip's be removed through the DNS Editor in WHM?

    Thanks,
    Steve
     
    #13 stevethemusicma, Jun 7, 2015
    Last edited: Jun 7, 2015
  14. LostNerd

    LostNerd Well-Known Member

    Joined:
    Mar 12, 2014
    Messages:
    258
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Hastings, East Sussex, UK
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yep. Use the DNS editor to edit these SPF records if they were not automatically done. :)
     
Loading...

Share This Page