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.

subdomain confusion

Discussion in 'General Discussion' started by Nishant80, Jun 1, 2013.

  1. Nishant80

    Nishant80 Well-Known Member

    Joined:
    May 7, 2012
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,
    I created a subdomain called subdomain.domain.com and the directory was placed under "/public_html/subdomains". Now, my confusion is that the subdomain can be access by both the URLS, i.e. subdomain.domain.com AND domain.com/subdomain.

    However, I just want the subdomain to work, I don't want people to be able to access the subdomain via domain.com/subdomain. How can I accomplish this?

    Note - Setting up domain redirection isn't working as its generating a loop error.
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    What if you don't tell people that it's possible?
     
  3. Nishant80

    Nishant80 Well-Known Member

    Joined:
    May 7, 2012
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    That is always there, but there always are those "curious" people who try a lot of things. And there has to be a way around for this, no?
     
  4. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    The best thing to do is to place the sudomain in /home/CPANELUSERNAME/subdomain directory instead of /home/CPANELUSERNAME/public_html/subdomain.
     
  5. Nishant80

    Nishant80 Well-Known Member

    Joined:
    May 7, 2012
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Yeah I've thought of that before. It wouldn't cause any technical issues later right? Since the source is not within public_html?
     
  6. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    No, nothing at all.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    This is correct. It's fully supported to create the subdomain with it's document root outside of the traditional public_html directory. You should not encounter any issues when doing this.

    Thank you.
     
Loading...

Share This Page