Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Create subdomain to match hostname

Discussion in 'General Discussion' started by fullfatdesigns, May 8, 2018.

  1. fullfatdesigns

    fullfatdesigns Well-Known Member

    Joined:
    Aug 1, 2014
    Messages:
    47
    Likes Received:
    6
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi

    I've recently changed my hostname in whm and I need to create a sub-domian that matches. But I get the message;

    There was a problem creating the sub-domain:
    Sorry you cannot create a subdomain with the same name as the hostname of this machine (xxxxxxx.xxxxxxx.net).

    Is there any way around this, as I'm trying to match the domain to the hostname with a rDNS.

    Regards
    Wayne
     
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    836
    Likes Received:
    62
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @fullfatdesigns


    You shouldn't be creating a separate subdomain for the hostname, it will cause issues on the system. The rDNS doesn't need to resolve back to the domain name, just the hostname of the server. For each IP address on the server that will be sending mail, I would suggest creating rDNS using the hostname of the server - all it needs to do is resolve the IP to the hostname to be accepted.

    Thanks!
     
  3. fullfatdesigns

    fullfatdesigns Well-Known Member

    Joined:
    Aug 1, 2014
    Messages:
    47
    Likes Received:
    6
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi Lauren

    Thanks for your reply. Originally I had the rDNS on a domain and the hostname was something else, but I was getting an error when testing email in mail-tester.com of;

    -1.999 FSL_HELO_BARE_IP_2 IP used in the HELO request
    The hostname should be a domain name, not an IP address

    So I contacted back my hosting provider and they suggested changing the hostname to match the domain. Is that correct?

    Also to point out, the account I setup with the same domain as the hostname was only to create a sub-domain, the account won't be used for anything else.

    Regards
    Wayne
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    836
    Likes Received:
    62
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi Wayne,

    That specific error is because you had the rDNS set up to resolve the IP to a domain name or you had an IP set in the mailhelo. Have you made modifications to /etc/mailhelo? This should resolve the IP to the hostname of the server and does not require a separate subdomain to be created, as long as the hostname has an A record that resolves it to the server the Reverse DNS will resolve the IP back to the hostname. The hostname of the server should not be modified to a domain name.

    No that is not correct, you should not change the hostname to match the domain.


    I think that the issue here may be a misinterpretation of the error. When you run the following can you show me what you get (removing any identifying information of course)

    Code:
    host <ipaddresshere>
    Can you also let me know if you have anything in /etc/mailhelo
     
  5. fullfatdesigns

    fullfatdesigns Well-Known Member

    Joined:
    Aug 1, 2014
    Messages:
    47
    Likes Received:
    6
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi Lauren

    I've changed my hostname so its not the same as the rDNS. I've gone to create the sub-domain for the rDNS (as it currently doesn't exist) and I'm getting this message;

    There was a problem creating the sub-domain:
    (XID zeqkf7) A DNS entry for the domain “xxxxx.xxxxxxxxxx.net” already exists.

    I'm not sure what to do next?

    Regards
    Wayne
     
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    836
    Likes Received:
    62
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi Wayne,


    That error indicates that there's a DNS entry for the domain already present, you'd need to check the existing DNS records first. Ultimately though, it sounds like rDNS needs to be updated to match the hostname of the server.

    Thanks!
     
  7. fullfatdesigns

    fullfatdesigns Well-Known Member

    Joined:
    Aug 1, 2014
    Messages:
    47
    Likes Received:
    6
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi Lauren

    I'm confused, I thought that I didn't want the rDNS to match the hostname of the server? I can't set the hostname to be the same domain as the hostname because I can't create the sub-domain...

    Regards
    Wayne
     
  8. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    836
    Likes Received:
    62
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi Wayne,


    The rDNS should resolve the IP address of the server to the hostname, always. It shouldn't resolve to another domain or an IP address. You should not need to set the hostname to be the same domain as the hostname.

    For example:

    My Hostname:
    server.example.com

    resolves to the IP address:
    1.2.3.4


    I would then create rDNS that resolved my IP to server.example.com:

    Code:
    4.3.2.1.in-addr.arpa     IN      PTR      server.example.com     14400s 

    My domains example.com and domain.com both resolve to the IP address 1.2.3.4 and both would work without issue using the PTR record as described here without any other modifications in place.


    I hope this helps.

    Thanks!
     
  9. fullfatdesigns

    fullfatdesigns Well-Known Member

    Joined:
    Aug 1, 2014
    Messages:
    47
    Likes Received:
    6
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Ok, thank you. Think I need to read-up more on domains.

    Thank you for your replies, I'm going to read-up and re-look at this tomorrow.

    Regards
    Wayne
     
  10. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    836
    Likes Received:
    62
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi Wayne,

    Please let us know if you run into any further issues with this once you do that.
     
Loading...

Share This Page