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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Edit Zonefile for cPanel

Discussion in 'Bind / DNS / Nameserver Issues' started by zalocus, May 5, 2017.

  1. zalocus

    zalocus Member

    Joined:
    Apr 30, 2017
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Austria
    cPanel Access Level:
    Reseller Owner
    Hello,

    I have a new Domain and i want to use it for my Cpanel/Servers i want to open Cpanel/WHM with the Domain s1.example.com:2087 and not with the IP.

    So now my Question i have copy the Standard Zonefile fronm my Host to show to you, can anybody show me how to change it correct to open my Cpanel/WHM with the domain (subdomain).

    Here the zonefile, lets use the domain Example.com and i want to open my server 1 with s1.example.com:2087 - s1.example.com:2083

    Code:
    $TTL 86400
    @   IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. (
        2017050500   ; serial
        86400        ; refresh
        10800        ; retry
        3600000      ; expire
        86400 )      ; minimum
     
    @                        IN NS      ns1.first-ns.de.
    @                        IN NS      robotns2.second-ns.de.
    @                        IN NS      robotns3.second-ns.com.
     
    @                        IN A       88.99.174.102
    mail                     IN A       88.99.174.102
    www                      IN A       88.99.174.102
    @                        IN MX 10   mail
    Thank you
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Assuming this is the DNS zone for "example.com", then you'd need to add an an "A" record for "s1" pointing to the IP address of your cPanel server. If the DNS is handled by the cPanel server (see this link), then you could add the entry via "WHM Home » DNS Functions » Add an A Entry for Your Hostname".

    Thank you.
     
    zalocus likes this.
  3. zalocus

    zalocus Member

    Joined:
    Apr 30, 2017
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Austria
    cPanel Access Level:
    Reseller Owner
    Thank you Michael,

    I use the standard Nameservers of my Host where my Domain is registred to, and the same Nameservers i enter in the "Basic WebHost Manager Setup" page, so i expact this means my Domain example.com is Handelt by my host and i need to add the 'A' Entry there and not in WHM, is this the right way? My second question is how this will work with the Ports: 2087 and 2083, do i need to set anything for this to in the zonefile?

    Ps. is this correct?

    Code:
    $TTL 86400
    @   IN SOA ns1.first-ns.de. postmaster.robot.first-ns.de. (
        2017050500   ; serial
        86400        ; refresh
        10800        ; retry
        3600000      ; expire
        86400 )      ; minimum
     
    @                        IN NS      ns1.first-ns.de.
    @                        IN NS      robotns2.second-ns.de.
    @                        IN NS      robotns3.second-ns.com.
     
    @                        IN A       88.99.174.102
    mail                     IN A       88.99.174.102
    www                      IN A       88.99.174.102
    s1                      IN A       88.99.174.102
    @                        IN MX 10   mail
    Tank you?
     
    #3 zalocus, May 5, 2017
    Last edited: May 5, 2017
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, you'd add the DNS entry through the provider where the DNS is hosted. As far as the ports, they will work automatically after you add the "A" record. No additional DNS records are required for them to work.

    Thank you.
     
    zalocus likes this.
  5. zalocus

    zalocus Member

    Joined:
    Apr 30, 2017
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Austria
    cPanel Access Level:
    Reseller Owner
    Thank you very much, that work now!

    How it will work when i want to use this Domain for more Cpanel/WHM Servers?

    Do i write in the same zonefile more hostnames for difrent servers?

    s1 IN A 28.94.123.456
    s2 IN A 95.44.123.456
    s3 IN A 77.69.123.456

    Or for every server a new zonefile with the same domain?

    Thank you
     
    #5 zalocus, May 5, 2017
    Last edited by a moderator: May 5, 2017
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You'd add the "A" records to the same zone file like the example you referenced.

    Thank you.
     
    zalocus likes this.
  7. zalocus

    zalocus Member

    Joined:
    Apr 30, 2017
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Austria
    cPanel Access Level:
    Reseller Owner
    Thank you. :)
     
  8. zalocus

    zalocus Member

    Joined:
    Apr 30, 2017
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Austria
    cPanel Access Level:
    Reseller Owner
    Hello, I have again a little question about the Entries when the domain "example.com" i only use to Link the hostnames for my servers

    s1 IN A 29.66.199.5
    s3 IN A 94.96.424.7
    s3 IN A 63.78.329.6

    Do i need the other Entries for Mail, www, and @, or only the "A" Entries for the hostnames like the Example i show you?

    Thank you.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You'd only need the "A" entries to ensure the hostname resolves to the correct IP address.

    Thank you.
     
Loading...

Share This Page