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.

Using subdomains

Discussion in 'General Discussion' started by firemagician, Feb 16, 2015.

  1. firemagician

    firemagician Member

    Joined:
    Dec 31, 2014
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,

    I'm just getting started into web developing, and also in cPanel

    I wanted to have a subdomain which I can use to have a different format for a certain page in my website

    But I don't know how to set the landing page for the subdomain, the root for the main website (/http://www.example.com) is in home/public_html

    And I want to have my subdomain (subdomain.example.com) to land on home/subdomain/index.php

    Any tips on how I can do that?

    Thanks! :)
     
  2. dynaweb

    dynaweb Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Oregon
  3. Brinkman

    Brinkman Registered

    Joined:
    Feb 16, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Thank you Dynaweb. I am also find this question answer. And finally i got it here. Thank you so much.
     
  4. dynaweb

    dynaweb Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Oregon
    You are very welcome Brinkman. Best of luck in your ventures.
     
  5. firemagician

    firemagician Member

    Joined:
    Dec 31, 2014
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi Dynaweb thank you for the response.

    I've already created a subdomain for the website but where the landing page would be when I go to that subdomain.

    For example: I go to (site1.example.com) and I set the destination to home/site1
    In what particular file in home/site1 would it access as a landing page?
     
  6. dynaweb

    dynaweb Well-Known Member

    Joined:
    May 14, 2003
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Oregon
    Yes, when you create a subdomain using the Cpanel interface, it simply creates a way to access a section of the site that typically can be accessed otherwise. For example, if you create a subdomain named subdomain1.example.com and have it associated to ./public_html/subdomain1/ then the contents of that directory can be web accessable in bith ways now...

    /http://subdomain1.example.com/
    and
    /http://example.com/subdomain1/

    If you would rather not have the contents of subdomain1 be accessible through the main domain name, it would be nice to simply create instead an Add-on Domain through the Cpanel interface and enter for the "New Domain Name" = subdomain1.example.com, but the Cpanel interface will not allow that. You can however, make a whole new domain name using the subdomain1.example.com name, just remember to make the appropriate A-record in the DNS of example.com.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Also, note that by default, the file named "index" is going to be the first page that loads from the directory (e.g. index.php).

    Thank you.
     
  8. firemagician

    firemagician Member

    Joined:
    Dec 31, 2014
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,

    I just started learning web developing so I need your help!

    I created a subdomain for my website (made from wordpress) and a folder on my public_html. The idea is to have a distinct page with a different formatting and database while using the same domain of my website. It's easy to make a subdomain but I don't know what the next step is.. I have all the website files ready.

    So, what should I do next? Should I just put the files inside the folder? Are there more configuration needed?
    How will it know what is the landing page/file?

    I tried putting an index.html and index.php in the folder but when I view the page, it is being redirected to an "under construction" page of my hosting provider (- Removed -)

    Sorry for asking so many questions, I really dont know :)

    Many Thanks!

    I tried putting an index.html and index.php on the directory of my subdomain, but it is being redirected to an "under construction" page of my hosting provider. - Removed Link -

    Are there more configurations needed?
     
    #8 firemagician, Mar 11, 2015
    Last edited by a moderator: Mar 11, 2015
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The next step is to upload your website files using FTP or File Manager to the directory that you entered when creating the subdomain. Note that I suggest consulting with your web hosting provider or posting to a web design forum for the issues with your index page, as these questions are not really related to the cPanel/WHM software itself.

    Thank you.
     
  10. firemagician

    firemagician Member

    Joined:
    Dec 31, 2014
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I've got it working now! thank you.

    But I got problems with redirection. I've set-up a redirect from subdomain.mysite.com to mysite.com/subdomain but it is not working. I thought it would take 24 hours before it's registered so I waited but still nothing.

    My subdomain.mysite.com doesn't show up anything while mysite.com/subdomain shows the content even though I created this in the subdomain panel
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Do you have root access to this system? If so, could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  12. firemagician

    firemagician Member

    Joined:
    Dec 31, 2014
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,

    This is the ticket ID: 6280657
     
    #12 firemagician, Mar 21, 2015
    Last edited by a moderator: Mar 21, 2015
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, it looks like you do not have root access to the server. It's advised that yo consult with your web hosting provider so they can take a closer look.

    Thank you.
     
Loading...

Share This Page