Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to fix server name in DNS Zones following a server name change

Discussion in 'Bind/DNS/Nameserver' started by AndyB78, Mar 21, 2019.

  1. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    Hello,

    We had to change the hostname on one of our servers (in fact we migrated all accounts and only afterwards we have migrated the server name as well) but the server name inside DNS zones remained unchanged.

    I am referring to records like:
    _caldav._tcp.domainname 300 IN SRV 0 0 2079 servername.

    I intend to do it like this:
    cd /var/named; sed -i 's/wrong_server_name/correct_server_name/g' *.db

    And restart named (bind).

    But I can see there are 4 .db files for each domain (caches and all).

    I assume that I should only change the .db files located directly in /var/named. Is this correct? Should I do anything else (besides backups I mean)?

    Thanks!
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @AndyB78


    You shouldn't need to modify the cache files but when you manually modify a DNS zone file you need to also update the serial. For example:

    This is my original serial:

    Code:
                                                    2019012101 ;Serial Number
    year 2019
    month 01
    day 21
    change # 01

    So if I was to modify it today for the first time It'd need to be changed to the following:

    Code:
                                                    2019032201 ;Serial Number
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice