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

From Acenet Knowledgebase
Jump to navigation Jump to search
test
 
Rewritten for current WHM and Acenet servers (WHM section refresh)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html> 1) Log into WHM as root.  
This guide is for '''cloud servers and dedicated servers''' with cPanel.
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.  
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.
<em>NOTE: This must be an FQDN (Fully Qualified Domain Name) and should consist of a name and a domain name. All valid hostnames should have 2 dots in them. An example of a proper hostname is:</em><br /><br /><em>server.yourdomain.com</em><br /><br /><em>where 'server' is the name and 'yourdomain.com' is the domain name.</em>
 
4) Click the <img style="vertical-align: middle;" title="Change" src="https://esupport.acenet-inc.net/knowledgebase_images/whm_change.jpg" alt="Change" width="65" height="21" /> button.<em></em>
== Choose a hostname ==
<br />
 
<span style="text-decoration: underline;"><strong>Add an A record entry for your hostname</strong></span><br /><br />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.<br /><br />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.<br /><br />1) Click the <img style="vertical-align: middle;" title="Add an A entry for your hostname" src="https://esupport.acenet-inc.net/knowledgebase_images/whm_addarecord.jpg" alt="Add an A entry for your hostname" width="218" height="22" /> button.<br /><br />2) Ensure the IP address specified is correct. (Usually it's your server's main IP)<br /><br />3) Click the <img style="vertical-align: middle;" title="Add Entry" src="https://esupport.acenet-inc.net/knowledgebase_images/whm_add_entry.jpg" alt="Add Entry" width="80" height="21" /> button. </html> [[Category:WHM (Web Host Manager)]]
* 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|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.