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.

*.domain.tld on one account, www.domain.tld on another

Discussion in 'Bind / DNS / Nameserver Issues' started by erikth, Mar 31, 2016.

  1. erikth

    erikth Member

    Joined:
    Mar 31, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Website Owner
    Hi!

    I am currently migrating a server from ISPConfig to Cpanel, and I have previously had one account for the www-site (www.domain.tld) and one for the server (server.domain.tld). On the server I have created a CNAME-input that all wild-cards (*.domain.tld) should be pointed towards server.domain.tld. However, in Cpanel when I try to create a wildcard alias for *.domain.tld to server.domain.tld it denies me since the www.domain.tld is already created.

    How do I do this setup on Cpanel?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I suggest adding the wildcard entry as a subdomain under the cPanel account (domain.tld):

    Subdomains - Documentation - cPanel Documentation

    Ensure you remove any custom DNS entries for the wildcard entry that you have already added before using this option. You can then update the "A" entry that's automatically added to the DNS Zone to a CNAME entry pointing to the external domain name of your preference via:

    "WHM >> DNS Functions >> Edit DNS Zone"

    Thank you.
     
  3. erikth

    erikth Member

    Joined:
    Mar 31, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Website Owner
    Is there any other way to do this? I would really like to have server.domain.tld under a separate account.

    The web-app (saas-solution) currently resides under server.domain.tld and www.domain.tld is basically just a leightweight webpage. I would really like to separate these two under different accounts for both simplicity and security reasons.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's acceptable to have a separate cPanel account for server.domain.tld, however you will need to ensure your hostname does not match that name:

    "WHM Home » Networking Setup » Change Hostname"

    You can't have the server hostname match the name associated with a cPanel account.

    Thank you.
     
  5. erikth

    erikth Member

    Joined:
    Mar 31, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Website Owner
    I am not sure that I have understood you correctly, I will provide some more information to you.

    - I have a saas-solution where the webapp is located at server.domain.tld
    - Users are able to signup and create an account where the content they create will be published at [name].domain.tld.
    - The subdomain www (www.domain.tld) has had one account (simple wordpress site) and server.domain.tld has had a different account (more heavy webapp).
    - I want to separate these accounts due to both simplicity and security reasons.
    - Previously I have entered a CNAME-wildcard for *.domain.tld that points to server.domain.tld.
    - The nameserver is handled by Linode.

    In Cpanel I currently have two accounts one for www.domain.tld which automatically changes into domain.tld, and one for server.domain.tld.
    I have created a CNAME-record for *.domain.tld pointing towards server.domain.tld. When I enter [anything].domain.tld I am greeted with an error message which tells me:

    "SORRY! If you are the owner of this website, please contact your hosting provider: ... It is possible you have reached this page because: 'The IP address has changed.', 'There has been a server misconfiguration.', 'The site may have moved to a different server.'"

    This is probably due to Cpanel not recognizing that the subdomain should point to server.domain.tld, however, when I try to add the domain alias *.domain.tld to the server-account it tells me that I don't have permissions to add this subdomain since it is owned by the domain.tld-account. How do I solve this?
     
  6. erikth

    erikth Member

    Joined:
    Mar 31, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Website Owner
    Additionally:

    I tried your first solution by adding a CNAME-record for *.domain. tld pointing towards server.domain. tld inside the domain.tld-account, i.e. Inside domain.tld-account: Zone edit; *.domain. tld -> server.domain.tld

    This did however not solve the problem.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    For instance, please browse to:

    "WHM Home » Networking Setup » Change Hostname"

    Make sure your hostname is not "domain.tld", "www.domain.tld" or "server.domain.tld". It needs to be something else if you want to use those domain names under cPanel accounts. For instance, you could configure it to "new-name.domain.tld".

    Thank you.
     
  8. erikth

    erikth Member

    Joined:
    Mar 31, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sweden
    cPanel Access Level:
    Website Owner
    It is not. My hostname is oxygen.domain.tld.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    To clarify, is this your shared hosting provider, or is the DNS for this domain name handled on a server other than your cPanel server? If it's a remote DNS provider, then keep in mind that any changes you make to the DNS on the cPanel server have no affect on DNS.

    Have you tried adding the wildcard entry as a subdomain instead of an alias? Remember to remove any manual DNS entries for the wildcard entry from the cPanel server (not your DNS provider) before attempting to add it as a subdomain.

    Thank you.
     
Loading...

Share This Page