• Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
  • Services
    • Web Hosting
    • Reseller Hosting
    • VPS Hosting
    • Dedicated Hosting
  • Domains
  • Features
  • Company
    • About Us
    • Server Locations
    • Affiliates
    • Company Blog
  • Support
  • Client Login
Home/Article/Linux/How to change the HostName or Fully Qualified Domain Name (FQDN) on CentOS 7

How to change the HostName or Fully Qualified Domain Name (FQDN) on CentOS 7

Written by VernalWeb
November 24, 2017

A Fully Qualified Domain Name (FQDN) is the complete domain name for a specific computer, or host, on the internet. The FQDN consists of two parts: the hostname and the domain name. For example, an FQDN for a hypothetical root server might be server.domainname.com. FQDN is very important for using servers. Probably, this is a very easy task. But very often, we get some support email regarding setting FQDN on servers. Hence, we are making an article on it.

Procedure of setting FQDN on CentOS 7:

Step 1: Login to your server / VPS as root or as a user with root privilege.

Step 2: Check current hostname:

1 hostname

Step 3: You may also want to find out status of your server and its hostname using hostnamectl command:

1 hostnamectl status

Step 4: Now here’s the magic command to change default CentOS 7 hostname without having to reboot your server:

1 hostnamectl set-hostname fqdn.host.name

Note: Please change fqdn.host.name to your own FQDN hostname. Example:

1 hostnamectl set-hostname backup.vernalwebhosting.com

So if you issue the hostnamectl status command again, you’ll see it changed. But however you’ll only see it has really changed if you close current session and reopen new SSH session (get out and login back)

So your Fully Qualified Domain Name (FQDN) is set.


We hope this tutorial helps you find the perfect solution. If your like our tutorials, definitely you’ll love our support. All VernalWeb hosting plans include 24/7 support from our amazing inhouse support staff. Check out our web hosting plans and have your website migrated today!

Was this helpful?

1 Yes  No
Related Articles
  • How do I order Extra IPs For My VPS/Dedicated?
  • How to Use KVM with the Intel Core i5 4570
  • How to Change the Default SSH Port (Linux / Ubuntu / Debian)
  • How to Change the Default SSH Port (Linux / CentOS)
  • Automating FTP Backups in Linux
  • How to whitelist an IP Address in ConfigServer Firewall (CSF)

Didn't find your answer? Submit Ticket

Latest Articles

  • How to show Hidden Files (.htaccess) in cPanel File Manager
  • Setup a Domain Redirection in cPanel
  • Create a MySQL Database and a User from cPanel
  • Remove page extensions using .htaccess
  • Cron Job Usage & Policy
  • © 2014 - 2025 VernalWeb. All rights reserved.