Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Apr 2011
    Posts
    20

    Default Reset DNS Zone instead adds duplicate entries

    Forgive me if there is another post on the forum asking this question, but I couldn't find it.

    For one domain in my WHM installation, whenever I reset the DNS Zone to its defaults, it doesn't work. If I do it in WHM, it says it succeeded, and displays a box on the screen showing what the newly reset Zone should contain, and that box contains the correct information.

    However, if I then go to Edit the Zone, I find that all that has happened is that those entries have been added as extra records to the zone, rather than the entire zone being replaced by just those records.

    Something is wrong. The same result happens if I use the Advanced Editor in Cpanel to reset the Zone. All the other domains I host reset with no problem at all.

    Obviously, I could just delete the entries one by one, but that is masking the problem. If I ever have need to do a Zone reset in the future, the same thing would happen. Furthermore, there may well be something else amiss that is causing it, so I'd rather get to the root of the problem.

    Does anyone have any ideas what I could try? (It did occur to me that I could delete the Zone, and then add it again, but I really don't know what Add Zone does, so I didn't want to break things any further! I wasn't sure, for instance, if doing that would lose all the subdomains on that domain.)

  2. #2
    Member
    Join Date
    Apr 2011
    Posts
    20

    Default Re: Reset DNS Zone instead adds duplicate entries

    I have found out a little more about this.

    If I look at the folder where all the zone files are stored, all the other domains have one file, named after the pattern example.com.db.

    This domain that is causing the problem has a file like that, but also a number of other files, named after the pattern of example.com.db.work.abcd1234ef567890 - that is, a suffix of .work, followed by another suffix of . followed by 16 random characters.

  3. #3
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,066

    Default Re: Reset DNS Zone instead adds duplicate entries

    The filename with "work" in it indicates that the DNS editing process was somehow interrupted before it was completed. This is not a common problem, so it would be best to submit a ticket and let us look at it and determine what is happening. Please post the ticket number once submitted so that we can follow up on it.
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  4. #4
    Member
    Join Date
    Apr 2011
    Posts
    20

    Default Re: Reset DNS Zone instead adds duplicate entries

    Quote Originally Posted by cPanelJared View Post
    The filename with "work" in it indicates that the DNS editing process was somehow interrupted before it was completed. This is not a common problem, so it would be best to submit a ticket and let us look at it and determine what is happening. Please post the ticket number once submitted so that we can follow up on it.
    Thanks Jared

    I think I've solved it, so I won't submit a ticket unless things recur. At some point (a couple of years back), I had created a subdomain on that domain called mail(.example.com). With the domain creation, there was an automatic CNAME entry for the mail. subdomain. When the subdomain was created in cpanel, an A record was also created.

    I backed up the zone file, deleted the DNS Zone in WHM, added the zone back, then performed a zone reset. When I went to Edit the zone entries, I tried clicking "Save" whilst making no changes. That was when I got an error that I couldn't have the CNAME and the A-record. I recreated the Zone again, deleted the A-Record entry in the zone file, then restarted named, and all is well.

    Presumably, either cpanel should refuse when someone attempts to create a subdomain called 'mail', ("Reserved word, please choose a different name for your subdomain" or such). Or, it should know that this subdomain does not need an A-Record. The current situation is not ideal, because it created the near-duplicate entry with one hand, whilst being unable to cope with the other.

  5. #5
    Member
    Join Date
    Apr 2011
    Posts
    20

    Default Re: Reset DNS Zone instead adds duplicate entries

    Anyone else facing the same issue: Delete the CNAME, and leave the A-Record. I initially did it the other way around, which meant my mail.example.com subdomain only had a CNAME for it. That worked 90% of the time, but some mailing software, when sending e-mail to recipient@mail.example.com, resolved the CNAME and sent it to recipient@example.com instead, which is not the behaviour I wanted.

    Conclusion: On creating a domain, the DNS zone is set up with a mail. subdomain CNAME entry pointing to the main domain. If you then create a mail. subdomain in Cpanel, it will also create an A-Record for the mail. subdomain. For the zone editors in WHM and Cpanel to handle that zone correctly, you need to delete the CNAME entry.

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Reset DNS Zone instead adds duplicate entries

    Of note, you can change the WHM > DNS Functions > Edit Zone Templates to hard-code an A record rather than a CNAME for the mail subdomain by changing the mail entry to the following:

    Code:
    mail IN A %ip%
    This would go into each the zone templates with a mail entry in them (standard and standardvirtualftp).
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. DNS Zone Reset ALL
    By romacities in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-26-2011, 01:33 PM
  2. Editing DNS Zone - Entries automatically appended with hostname
    By fortheloveof_d in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-13-2009, 10:09 PM
  3. Fixing DNS Zone Entries???
    By poprulz in forum New User Questions
    Replies: 1
    Last Post: 01-08-2008, 03:15 PM
  4. DNS Clustering - Duplicate Entries in named.conf
    By MattF in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 07-13-2005, 03:30 PM
  5. Altering Automatic DNS Zone Entries On Account Creation
    By WestBend in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-03-2003, 11:20 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube