Skip to main content

Reset ALL DNS Zones

Comments

6 comments

  • cPanelMichael
    Hello, Are you sure the domain name in-question isn't added to an existing account as the primary domain name, or an alias/add-on domain name? You can check with a command such as:
    grep $domain /etc/userdomains
    If so, you'd need to first remove the domain name from the existing account before adding it to a new one. Thank you.
    0
  • Shawn Paul
    Hello, Thanks for the quick reply. The domain 'abccc1111.org' is rightfully owned by cpanel user 'abccc11'. What I wanted was to delete and re-add the DNS zone while logged in as root user. I was trying for one user and if it worked then I would have used the following to reset for all cpanel users on the server: ############# for i in `cat /etc/trueuserdomains | cut -d: -f1` ;do /scripts/killdns $i ;done for i in `cat /etc/trueuserdomains | cut -d: -f1` ;do /scripts/add_dns --domain=$i ;done ############# Is there a different [or better] way of resetting the DNS zones of all cPanel Accounts via SSH? I have a server which was recently migrated and some domains' A records are still pointing to the old server IP. Resetting DNS, or deleting and adding DNS for each domain in the new server is resolving the issue. Problems is that the server has hundreds of cpanel users. I wanted a way of resetting all DNS zones [for all cPanel users on the server] to default.
    0
  • cPanelMichael
    There are no native features that will allow you to reset the zone for multiple DNS zones at the same time, however I encourage you to vote and add feedback to the existing feature request for this functionality at: Multiple Domain (DNS Zone) Reset/Update As a workaround, you could use the instructions on the following thread to replace the "A" record from one IP address to a different one: Bulk DNS Zone Update Thank you.
    0
  • Shawn Paul
    This is noted with thanks. I already used the guide at Bulk DNS Zone Update to successfully replace name servers on a different server yesterday. For this server I've found that ns1 and ns2 are correct. Now I just need to ensure that the A record for all cpanel accounts points to the new server IP and not the old server IP. Is there a way of doing so via command line?
    0
  • Shawn Paul
    Sorry, the issue of replacing A record seems mentioned in the thread you pointed to. It's just not very clear to me. I need a command to replace the old server IP with the new server IP in the A records.
    0
  • cPanelMichael
    I need a command to replace the old server IP with the new server IP in the A records.

    Hello, Have you already tried the "WHM >> IP Migration Wizard" option? It's designed for this type of change, and is documented at: IP Migration Wizard - Version 64 Documentation - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.