• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Is it right to use the VPS Hostname in the MX DNS Record?

Craig1986

Basic Pleskian
At present, I have a VPS with the following Hostname assigned:
  • mail.example.com
I was advised, by my Registrar, that the VPS Hostname should contain the Domain Name of one of the Domains Hosted on the VPS and have the 'mail' prefix. Furthermore, it is this entry that should be used in the MX DNS Record and SPF Record.

This has worked fine to date however, I have now purchased a new domain and would like it hosted on the same VPS. As such, the new Domain does not feature within the VPS Hostname. With this in mind, I was concerned this may cause issues with the DNS Settings. I spoke to my Registrar, who stated that having a 'mail.example.com' would be fine in the new Domain's DNS Settings rather than 'mail.new-example.com'.

Being unconvinced, I had a look around the VPS Settings and noticed that, at the Domain Level, there was a reference to 'mail.new-example.com' within the following location:

  • Websites & Domains > Domain Name > DNS Settings.
As such, I am now wondering the following:

  1. Does the VPS Hostname need to following the 'mail.domain.com' structure or can it be assigned any name?
  2. Should I use the VPS Hostname as the entry for the MX DNS Records or should I use the Domain specific variant even though it may not be referenced within the VPS Hostname?
 
At present, I have a VPS with the following Hostname assigned:
  • mail.example.com
I was advised, by my Registrar, that the VPS Hostname should contain the Domain Name of one of the Domains Hosted on the VPS and have the 'mail' prefix. Furthermore, it is this entry that should be used in the MX DNS Record and SPF Record.

This has worked fine to date however, I have now purchased a new domain and would like it hosted on the same VPS. As such, the new Domain does not feature within the VPS Hostname. With this in mind, I was concerned this may cause issues with the DNS Settings. I spoke to my Registrar, who stated that having a 'mail.example.com' would be fine in the new Domain's DNS Settings rather than 'mail.new-example.com'.

Being unconvinced, I had a look around the VPS Settings and noticed that, at the Domain Level, there was a reference to 'mail.new-example.com' within the following location:

  • Websites & Domains > Domain Name > DNS Settings.
As such, I am now wondering the following:

  1. Does the VPS Hostname need to following the 'mail.domain.com' structure or can it be assigned any name?
  2. Should I use the VPS Hostname as the entry for the MX DNS Records or should I use the Domain specific variant even though it may not be referenced within the VPS Hostname?

Hello,
here few rules you should follow to configure your server :

1) your VPS Hostname should be a Fully-Qualified-Domain-Name (FQDN) like server.mydomain.tld or plesk.mydomain.tld.
2) the VPS hostname should resolved the server IP, so do not forget to add the proper DNS records for the hostname : plesk.domain.tld -> Server IP
3) The VPS IP should resolved the server Hostname, it's the reverse DNS : Server IP -> plesk.domain.tld

Then you can use a subdomain like mail.yourhostedomain.tld as MX entry, but there is nothing wrong in using directly the server hostname for all your domains hosted on this server.
 
Thank you for your response.
  1. Fully Qualified Domain Name: Am I right in saying that the sub-domain 'mail.example.com' is fine? With the 'example' needing to be replaced with a Domain that is already hosted on the VPS? Therefore, it cannot be any name? By the Hostname referencing a Domain on the VPS, would the named Domain receive any preferential/priority treatment over the other Domains?
  2. Hostname DNS Record: I currently have a Wild Card (*) DNS Record that points to the Server IP, as well as a DNS Record for 'mail', 'webmail' and 'www'. Is this what you are referring to or have I misunderstood?
  3. Reverse DNS: Where would I be able to perform this modification?
To clarify, it is perfectly fine to use either the Hostname or the Domain level 'mail.domain.com' variant?
 
Thank you for your response.
  1. Fully Qualified Domain Name: Am I right in saying that the sub-domain 'mail.example.com' is fine? With the 'example' needing to be replaced with a Domain that is already hosted on the VPS? Therefore, it cannot be any name? By the Hostname referencing a Domain on the VPS, would the named Domain receive any preferential/priority treatment over the other Domains?
  2. Hostname DNS Record: I currently have a Wild Card (*) DNS Record that points to the Server IP, as well as a DNS Record for 'mail', 'webmail' and 'www'. Is this what you are referring to or have I misunderstood?
  3. Reverse DNS: Where would I be able to perform this modification?
To clarify, it is perfectly fine to use either the Hostname or the Domain level 'mail.domain.com' variant?

Hello @Craig1986,

1.FQDN Yes you are right about mail.example.com, here a better example than mine from Wikipedia :

A device with the hostname myhost in the parent domain example.com has the fully qualified domain name myhost.example.com

But the server hostname do not have any impact on other domains hosted on the same server. You can even use a subdomain as hostname, from a domain hosted elsewhere.

2. The wildcard is enough

3. Reverse DNS can be updated from your hosting provider's server control panel (with the most part of providers, otherwise open a support ticket)

And to answer to your last question, yes you can use either the server hostname or the subdomain mail.domain.tld as MX records.
 
Back
Top