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!

Permanently set hostname in cpanel

Discussion in 'Workarounds and Optimization' started by noaptus, Oct 24, 2012.

  1. noaptus

    noaptus Member

    Mar 19, 2008
    Likes Received:
    Trophy Points:

    I had this problem for some time and it was making me go nuts.

    When i restarted my virtuozzo vps server the hostname change.

    I wantet to permanently set the hostname for my VPS Server.

    to fix this after reboot do this.

    Go to your WHM login as root

    Home »Networking Setup »Change Hostname

    SSH to you server as root

    Do this commant


    Then do this to se if you have set the hosname


    and the outcome should be

    and do this

    #hostname -f

    and the outcome should be

    Then go to vi /etc/sysconfig/network


    Change the HOSTNAME= and the DOMAINNAME= to

    so it would look like this


    And finaly do this

    #cd etc/sysconfig

    and execute this command

    chattr +i network

    and now you have permanently set hostname in cpanel

    It's best to do this BEFORE you install cPanel on your server.

    I hope this help.

    Don't forget to say Thanks!


    Adolf Bragi
    #1 noaptus, Oct 24, 2012
    Last edited: Oct 24, 2012

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