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.

Changing subdomain that will access files

Discussion in 'Bind / DNS / Nameserver Issues' started by Techmo9j, Jul 29, 2017.

  1. Techmo9j

    Techmo9j Registered

    Joined:
    Jul 29, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Hey guys!

    I'm new to using cPanel and am in need of some help.

    So I have a domain from namecheap.com (example.us)
    I have setup the nameservers to point to my cPanel host. Great that works!
    I see in the "zone editor" That there are a few existing records.

    In order to get my website (hosted from a company called Enjin) to work with my domain, I must have "@" pointing to 107.154.xxx.xx and a second "@" pointing to 107.154.xxX.xx. I also need www to point to app.domain.com. as a cname record. In cPanel, I don't know what replaces the @ (root) subdomain.

    Now this is where it becomes a problem:
    I have a custom PHP page hosted at "/punishments-page", but right now, those two "@" subdomains are actually set as "*", because I don't know what should replace that, since @ is not allowed. So ideally, I want people to be able to go to example.us and be taken to the domain.com page (or redirected to example.us), but only if there is nothing after the ".us", because I need to display my PHP page within the domain.com site.

    The easiest way I see this being possible, but I am unaware on how to do so is:
    Set a subdomain that will replace "example.us." but still access the files. If I change that A record to be "files.example.us.", that won't work because the files are listening for a connection without any subdomain.

    In the end, what needs to be changed is:
    The subdomain and/or domain that the files server listens on...
    It needs to become files.example.us or something. And leave "example.us." open for domain.com.



    If you've made it this far, thanks! I hope you can help me.


    Any help is appreciated,
    Thanks,
    Techmo
     
    #1 Techmo9j, Jul 29, 2017
    Last edited by a moderator: Jul 30, 2017
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,488
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    "@" represents the current root domain, so check the DNS section that has domain name DNS records..
    If possible send in a screenshot with blurring the other information that could be critical.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    If you point "domain.tld" to a remote server via a DNS record, then access attempts to "domain.tld/subdirectory" will resolve to the remote server's IP address because you can't make separate DNS records for subdirectories. Instead, you may want to setup a subdomain that points to the remote server, and then setup Mod_Rewrite rules that redirect requests made to the domain name (and not it's subdirctories) to the subdomain.

    Thank you.
     
Loading...

Share This Page