What is FQDN?

FQDN stands for Fully Qualified Domain Name. It’s complete domain name for a computer or host on the internet. FQDN is made of two things: hostname and domain name.

Let me give you an example for demonstration.

FQDN for my mail server is myemailserver.abdullah.today.

The hostname is myemailserver. The domain is abdullah.today.

Requirements

You will need:

  • IP Address
  • Hostname
  • FQDN

Edit hosts file

Edit the /etc/hosts file and append this like this.

# vim /etc/hosts
...
192.168.1.100 myemailserver.abdullah.today myemailserver
...
:wq!

Replace IP address with your host IP, hostname with what your want to set or what you already have set.

Edit hostname

Edit /etc/hostname and replace with your new hostname if you want to change hostname as well.

# vim /etc/hostname

myemailserver

:wq!

Or you can use hostnamectl to set hostname.