VPS & Dedicated Hosting: Changing the Hostname
Changing the hostname of your VPS or Dedicated server is an important step in managing your web hosting environment. A hostname is a label assigned to a device, such as a server, that is connected to a network like the Internet. It identifies the server and allows other systems to communicate with it.
This guide will discuss the following topics:
What Happens When You Change the Hostname?
The hostname plays several important roles in server management. Below is an overview of these roles.
- Ensure the server is correctly identified within the network.
- Assist in server troubleshooting by linking the server to a human-readable name.
- Contribute to the structure of URLs for web services hosted on the server.
Changing the hostname can have significant implications for server management. Here’s how it affects various aspects of managing a server.
Impact on DNS Resolution
The Domain Name System (DNS) translates web addresses (e.g., thisisasampledomain.com) into IP addresses needed to find servers. The hostname is directly linked to the DNS record associated with a domain.
How does it work? When you enter a URL (e.g., www.thisisasampledomain.com), DNS connects it to an IP address (e.g., 123.456.78.900) linked to the server. The hostname is part of this connection.
Email Server Configuration
Hostnames help route emails to the correct mail server through Mail Exchange (MX) records. To configure the email server correctly, you need the FQDN (Fully Qualified Domain Name), which includes the hostname. Protocols like SPF, DKIM, and DMARC use hostnames to verify that emails are legitimate, reducing spam risks.
How does it work? For example, emails sent from [email protected] go through a mail server identified by a corresponding hostname like mail.thisisasampledomain.com.
Impact on SSL Certificates
SSL certificates encrypt data between the browser and the server and must match the hostname for security.
How does it work?
- SSL matching: When setting up an SSL certificate for a URL (e.g., https://www.thisisasampledomain.com), the hostname is verified to ensure that the certificate is issued to the correct domain or subdomain.
- Security concerns: An incorrect hostname or a mismatch with the SSL certificate can lead to SSL/TLS errors and prevent users from making a secure connection.
Impact on Server Security
The hostname can affect server security in several ways:
- Spoofing risks: Attackers may fake a hostname to intercept data. Using security measures like DNSSEC can help prevent this.
- Host header injections: Attackers can exploit hostnames to trick servers into processing malicious requests. Good server configuration is essential to prevent this.
- Easier server identification: A clear and well-configured hostname helps identify servers quickly, making it easier for administrators to respond to security issues and incidents. This improves response time during threats.
Impact on Server Performance
While the hostname doesn’t directly affect how fast requests are processed, it helps with efficient server access and load balancing.
How does it work?
- Load balancing: In larger systems with multiple servers, hostnames assist in evenly distributing traffic to maintain performance.
- DNS resolution speed: Proper DNS setup is important, as delays in hostname resolution can slow down access to the server.
Changing the Hostname
- Log in to your WHM.
- On the left navigation panel, search for Change Hostname, which is found under Networking Setup.
- On the Change Hostname page, you will find notes, sample hostnames, randomly generated hostnames, and your server's current hostname.
To sum up the instructions, you need to remember that this is publicly visible. It needs to be a Fully Qualified Domain Name, never start with www or digit, and never end with a hyphen.
- Enter the new hostname in the New Hostname field, with the hostname looking much like a subdomain. For example, server.example.com, host.example.com, etc.
- Click the Change button.
Once the Apache configuration has been updated, you will be reminded to create an A record for your new hostname. If you have already created an A record for the new Hostname, you can ignore the following steps.
- Click the Add an A entry for your hostname.
- Verify that the hostname and IP address are correct.
- Click Add Entry.
Summary
This article details the process of changing the hostname for VPS and Dedicated servers using the WHM (Web Host Manager) interface. By following these instructions, you can ensure that your server's hostname is correctly configured, which is essential for maintaining server functionality, security, and optimal performance.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.