Change your server's hostname in WHM: Difference between revisions

From Acenet Knowledgebase
Jump to navigation Jump to search
No edit summary
Rewritten for current WHM and Acenet servers (WHM section refresh)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Change your Hostname==
This guide is for '''cloud servers and dedicated servers''' with cPanel.


[1] Log into WHM as root.
Your server's hostname is its own name, such as ''server.example.com''. cPanel uses it for logging in to WHM and cPanel, for the server's own SSL certificate and in the headers of every email the server sends.
[2] Click on 'Change Hostname' under the 'Networking Setup' section.  
[3] Enter the new hostname you wish to use in the 'New Hostname' text field.  


{{note|This must be an FQDN (Fully Qualified Domain Name) and should consist of a name part and a domain name. All valid hostnames should have 2 dots in them. An example of a proper hostname is:
== Choose a hostname ==


* Use a subdomain of a domain you own, such as ''server.example.com''. Don't use a domain that hosts a website, such as ''example.com'' itself.
* Don't start it with ''www'' or a number, and don't end it with a hyphen.
* Keep it to 60 characters or fewer.


server.example.com
== Step 1: Point the hostname to your server ==


where 'server' is the name part and 'example.com' is the domain name.}}
Create an '''A''' record for the hostname that points to your server's main IP address, wherever the domain's DNS is hosted.


[4] Click the [[File:Whm_change.jpg‎]] button.
* If the domain's DNS is on your server, use '''DNS Functions''' > '''Add an A Entry for your Hostname''' in WHM after step 2.
* If it's hosted somewhere else, such as Cloudflare, add the record there. On Cloudflare, set it to '''DNS only''', not proxied.


==Add an A record entry for your hostname==
== Step 2: Change the hostname ==


If your server is handling the domain's DNS that is associated with your server's hostname, you will want to proceed with the following steps to add an A record for your hostname through your server's WHM.
'''1.''' Log in to WHM as root and go to '''Networking Setup''' > '''Change Hostname'''.


If your server is not handling the DNS of the domain associated with your server's hostname, you will want to create the A record for your hostname at the server that's handling the domain's DNS.
'''2.''' Enter the new hostname and click '''Change'''.


[1] Click the [[File:Whm_addarecord.jpg‎]] button.
WHM updates the server and cPanel's own settings. Once the '''A''' record from step 1 works, cPanel gets a free SSL certificate for the hostname automatically.


[2] Ensure the IP address specified is correct. (Usually it's your server's main IP)
On a cPanel server, always change the hostname in WHM. Other ways of changing it, such as the '''Change Hostname''' button in the Client Area or commands on the server, don't update cPanel's settings.


[3] Click the [[File:Whm_add_entry.jpg‎]] button.
== Step 3: Reverse DNS ==


[[Category:WHM (Web Host Manager)]]
Many mail servers check that the reverse DNS (PTR record) of your server's IP address matches its hostname, and may reject email when it doesn't. To set reverse DNS for your IP address, please [[Open a support ticket|open a support ticket]] in the '''Technical Support''' department with the IP address and the hostname.
 
For details, see cPanel's [https://docs.cpanel.net/whm/networking-setup/change-hostname/ Change Hostname] documentation.
 
[[Category:WHM]]

Latest revision as of 10:26, 27 October 2026

This guide is for cloud servers and dedicated servers with cPanel.

Your server's hostname is its own name, such as server.example.com. cPanel uses it for logging in to WHM and cPanel, for the server's own SSL certificate and in the headers of every email the server sends.

Choose a hostname

  • Use a subdomain of a domain you own, such as server.example.com. Don't use a domain that hosts a website, such as example.com itself.
  • Don't start it with www or a number, and don't end it with a hyphen.
  • Keep it to 60 characters or fewer.

Step 1: Point the hostname to your server

Create an A record for the hostname that points to your server's main IP address, wherever the domain's DNS is hosted.

  • If the domain's DNS is on your server, use DNS Functions > Add an A Entry for your Hostname in WHM after step 2.
  • If it's hosted somewhere else, such as Cloudflare, add the record there. On Cloudflare, set it to DNS only, not proxied.

Step 2: Change the hostname

1. Log in to WHM as root and go to Networking Setup > Change Hostname.

2. Enter the new hostname and click Change.

WHM updates the server and cPanel's own settings. Once the A record from step 1 works, cPanel gets a free SSL certificate for the hostname automatically.

On a cPanel server, always change the hostname in WHM. Other ways of changing it, such as the Change Hostname button in the Client Area or commands on the server, don't update cPanel's settings.

Step 3: Reverse DNS

Many mail servers check that the reverse DNS (PTR record) of your server's IP address matches its hostname, and may reject email when it doesn't. To set reverse DNS for your IP address, please open a support ticket in the Technical Support department with the IP address and the hostname.

For details, see cPanel's Change Hostname documentation.