Change your server's hostname in WHM: Difference between revisions
Docs admin (talk | contribs) m Docs admin moved page How to change your server hostname in WHM to Change your server's hostname in WHM: Clearer title (WHM section refresh, Oct 2026) |
Docs admin (talk | contribs) Rewritten for current WHM and Acenet servers (WHM section refresh) |
||
| Line 1: | Line 1: | ||
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 == | |||
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]] | [[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.