Results 1 to 10 of 10

Thread: Change my hostname?

  1. #1
    Member
    Join Date
    Feb 2004
    Location
    UK
    Posts
    32

    Default Change my hostname?

    Hi

    I am wondering if it will cause any problems if I cahnge my server hostname?

    What else would I have to change to get the name changed?

    It is currently set to

    xxxxxxxx1.xxxxxxx.co.uk

    if I want this as something else I can change it in edit setup, but is this going to cause anything else to stop working?

    Cheers
    br3ach

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,496

    Default

    It shouldn't cause any problems. Make sure that you have a DNS entry for the new hostname before you configure it in WHM.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Jun 2005
    Posts
    25

    Default

    Can I ask, what is a hostname?

    "* Enter the hostname of the primary nameserver (normally, the name of this server) you wish to use when creating new domains or subdomains."


    On whm, when it ask that, what does that mean? Can I pick any nameserver I want? I mean any nameserver? Like out of the blue? Or does something have to happen?

  4. #4
    Member
    Join Date
    Jun 2005
    Posts
    25

    Default

    I'm quite confuse on what is the hostname.

    "It is important to choose a hostname that you will not be using for any account. You should choose something that will be socially accpetable, as it will appear in all mail headers. Your hostname must be a FQDN. In english, A hostname should consist of a name and a domain name. All valid hostnames should have 2 dots in them. Hostnames should never begin with "www". "


    On the page where it says the above, so the host name is basically a domain name? And the domain name can be rigister by any rigistra?

  5. #5
    Member
    Join Date
    Jul 2004
    Posts
    203

    Default

    Here is an example Hostname:

    whatever.domain.com

    The Hostname is like the name of the server. It shouldn't be created as an account on the server, as it is the main name for the server. It can be used to uniquely identify your server ( ie mail headers )

    Here are some of the ways you will see the Hostname ( as admin ):

    In a web browser:
    http://whatever.domain.com:2086 - which is the WHM for the server ( WHM can also be accessed other ways )

    In an SSH client
    root@whatever [~]# - which is the command line while connected to the server

    Hope That Helps.
    Regards,
    RAIS


    { RAIS Hosting }~{ Superior Hosting Solutions - Personal, Business, Reseller Solutions. Great value }
    { RAIS Domains }~{ Low cost Domain Name registration services }

  6. #6
    Member KMK Enterprises's Avatar
    Join Date
    Feb 2005
    Posts
    53

    Default

    Quote Originally Posted by azn_romeo_4u
    I'm quite confuse on what is the hostname...so the host name is basically a domain name? And the domain name can be rigister by any rigistra?
    Yes, you start by purchasing a domain name from a registrar: domain.com

    You make it a hostname in WHM, by adding something (besides www) in front of it: whatever.domain.com - example: server.domain.com

    Quote Originally Posted by azn_romeo_4u
    Can I pick any nameserver I want? I mean any nameserver? Like out of the blue? Or does something have to happen?
    No. Nameservers also start with a registered domain name. You can't just make them up. You can however, use the same domain name you used for your hostname. Nameserver examples: ns1.domain.com or dns1.domain.com. A domain which will be used as a nameserver, requires special information to be added to the registration records at your registrar. This information is sometimes called host records, or domain server records - it differs with different registrars. These records contain the names you will be calling your nameservers (ns1.domain.com and ns2.domain.com) and the IP addresses you assign to your nameservers.

  7. #7
    Member
    Join Date
    Jun 2004
    Location
    Southern California
    Posts
    255

    Default does it matter if...

    does it matter if I've changed the primary and secondary dns's for the server if I still have those original dns's listed as valid DNS's in "Manage Nameserver IP's".

    example:

    I've had this:
    ns1.domain1.com < set as primary
    ns2.domain1.com < set as secondary

    and I've added these:
    ns1.domain2.com < want to make primary
    ns2.domain2.com < want to make secondary

    now in WHM primary & secondary nameservers I want to change ns1.domain1.com & ns2.domain1.com both to the "domain2" DNS's.

    I assume that since I'm not removing the original ns1 & ns2 from the server that no sites would go down, nor need to have their DNS's updated at their respective registrars..

  8. #8
    Member Vatoloco's Avatar
    Join Date
    Jun 2004
    Posts
    100

    Default Changing Hostname

    Here's the guide I've always used to make sure my hostname is changed correctly:

    http://forums.ev1servers.net/showthr...threadid=22882

    Quote Originally Posted by disoft
    I thought I'd start this HOW-TO for changing the CPanel hostname. Please let me have your input and maybe we can make this thread a 'definitive' HOW-TO.

    -----------------------------

    1. Change Hostname In WHM
    Select Change Hostname from the Server Setup section on the menu to the left.

    Enter the new hostname in the box and click 'Change'. Hostnames should have two dots in them and should be setup as if they're a subdomain of your server's main domain name. So, if your server's main domain is mybox.com, your hostname could be something like server01.mybox.com.

    WHM then prompts you to add an 'A Entry for your hostname' if you don't already have one (see bnext point)

    2. Add an 'A' Entry
    You can do this by going to the DNS Functions area of the left menu and selecting Add an A Entry for your Hostname. It will ask you to confirm the details: press Add the entry to do so.

    3. Manual Checks
    Now this didn't work fully when we did it, so we had to check some stuff manually (none, some or all of these may need ameding in your environment). SSH to your server and do the following:

    'hosts' file
    Type: pico /etc/hosts and check that the entries are as follows -

    127.0.0.1 localhost
    xxx.xxx.xxx.xxx server01.mybox.com server01

    - replacing xxx.xxx.xxx.xxx with your server's IP address and adding your hostname after it.

    Hit CTRL+X and reply 'y' to exit pico and save the file.

    Apache
    Type: pico /etc/httpd/conf/httpd.conf, scroll down and find the ServerName entry and make sure your fully qualified hostname (i.e. server01.mybox.com) is specified after it.

    While you're there, you may want to change the ServerAdmin e-mail (just above the ServerName) too.

    Hit CTRL+X and reply 'y' to exit pico and save the file.

    wwwacct.conf
    Type: pico /etc/wwwacct.conf, scroll down and find the HOST entry and make sure your fully qualified hostname (i.e. server01.mybox.com) is specified after it.

    Hit CTRL+X and reply 'y' to exit pico and save the file.

    resolv.conf
    Type: pico /etc/resolv.conf, and check that the first two lines read as follows -

    domain mybox.com
    search mybox.com

    Replacing mybox.com with your server's primary domain name and adding your own nameservers to the file.

    Hit CTRL+X and reply 'y' to exit pico and save the file.

    network
    Type: pico /etc/sysconfig/network, and check that HOSTNAME line specifies your host name.

    Hit CTRL+X and reply 'y' to exit pico and save the file.

    --------------------

    You may need to reboot your box to make hostname changes take effect.

  9. #9
    Member
    Join Date
    Mar 2004
    Posts
    715

    Default

    You are missing one of the most important steps. You need to have your datacenter setup the reverse IP for your new server name. If not, some people block your email, etc., etc.

    So your main IP address will directly resolve to your hostname and your hostname will directly resolve to your ip. Otherwise it is called an mismatch which is not good.
    Lloyd F Tennison

  10. #10
    Member
    Join Date
    Aug 2004
    Posts
    77

    Default

    Yeah,
    I had the same issue.

    I originally named my box server1.website.com ... after realizing I no longer wanted people to know they were on 'box1', 'box2', etc instead just a specificly named box I had to go through the steps listed above and change everything and then go into my hosts control panel and reset my info with them too to re-route everything.

    It was tedious... but it worked in the longrun.

Similar Threads

  1. hostname change
    By jandafields in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 07-14-2008, 05:30 PM
  2. Hostname Change
    By wilfried in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 05-10-2006, 02:02 PM
  3. how change hostname
    By tidus666x in forum New User Questions
    Replies: 11
    Last Post: 01-10-2006, 07:51 AM
  4. Hostname Change
    By manokiss in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 03-06-2003, 10:40 PM