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 is pointing to server instead of newly created cpanel account

Discussion in 'Bind / DNS / Nameserver Issues' started by kapilkd13, Jun 9, 2016.

  1. kapilkd13

    kapilkd13 Member

    Joined:
    Jun 9, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    delhi
    cPanel Access Level:
    Reseller Owner
    I have installed cPanel & WHM: The Hosting Platform of Choice on my ec2 micro instance. Now I am trying to run a website on it. I created a new account with whm which points to the same ip as my server ip(WHM generated it, means I didn't get to choose which ip to use). Now the server ip is a amazon elastic ip. I only have this ip.
    I checked the option to use domain registrar nameserver and on dot tk panel I used their free DNS. They supply their default nameservers. I pointed this domain to only ip I have i.e server ip. Now when I user that domain it takes me to server page. example.tk/cgi-sys/defaultwebpage.cgi example.tk is my domain name. But what I want is it should take me to exampke.tk/~user5/ here user5 is my newly created account username.It's for test purpose I will change it. I am working on this for 3 days but couldn't figure out what to do. according to me problem is that my whm nameserver( I choose bind is not working). I have tried using my own DNS in dot tk panel but I only have 1 ip address so where should I point nameservers. For test purpose I pointed both nameservers to my server ip(amazon elastic ip) and opened port 53(for inbound) on aws setting and choosing anywhere access.
    On my list accounts page, when I click on domain link it takes me to the server ip and when i click on ip address it takes me correct destination. I think problem is my server cannot point domain to correct destination.

    Can I do this using 1 ip only. Also I have no problem in using server root ip to host my website, if it just takes me to my website homepage. but you can see on above first link it takes me to a page which shows some error.
    I want to know how to configure my domain that it point to correct address. Any help would be appreciate. Thanks
     
    #1 kapilkd13, Jun 9, 2016
    Last edited by a moderator: Jun 9, 2016
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    275
    Likes Received:
    31
    Trophy Points:
    28
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    If you are using dot.tk's name servers then doing anything DNS related in cPanel is pretty much null.

    As long as you added the exact domain name into cPanel, and you have an A Record set to the IP of your server, then the site should load.

    Can you confirm your domain is resolving to the IP showing if you go to WHM > List Accounts

    If it is, then clear your browser history and try to view your website again.
     
  3. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Also, you will have to make sure that you have to set your server's hostname same as your domain name otherwise it will not work. Server's hostname should not be live website.
     
  4. kapilkd13

    kapilkd13 Member

    Joined:
    Jun 9, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    delhi
    cPanel Access Level:
    Reseller Owner
    Hi Kailash
    In some tutorials I saw them using different hostname and using new domain to host websites. I will change it to my original domain as you say like host.my-domain.tk. After doing this do I have to change anything in my domain registrar.
    Also
    When I look into the list accounts in whm it shows domain column that list my domain and a Ip address column that has a hyperlinked ip address. when I click onto that hyperlinked ip address it takes me to correct address, showing my website. But when I click onto domain name present in domain column, it takes me to my server ip address my-server-ip/cgi-sys/defaultwebpage.cgi is shown. Note that I have created multiple accounts trying to get it right. So I have many rows each having different domain name but same Ip address(my-server-ip). Now surprisingly these ip address look same but when I click on them they take me to their corresponding accounts webpage. I dont want to host multiple accounts and I have no problem deleting all but 1 if it solves anything. Thanks
     
    #4 kapilkd13, Jun 11, 2016
    Last edited by a moderator: Jun 11, 2016
  5. kapilkd13

    kapilkd13 Member

    Joined:
    Jun 9, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    delhi
    cPanel Access Level:
    Reseller Owner
    Note that I have created multiple accounts trying to get it right. So I have many rows each having different domain name but same Ip address(my-server-ip). Now surprisingly these ip address look same but when I click on them they take me to their corresponding accounts webpage. I dont want to host multiple accounts and I have no problem deleting all but 1 if it solves anything. Thanks
     
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    275
    Likes Received:
    31
    Trophy Points:
    28
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    When you ping the domain that you are trying to access, does it resolve to the IP that shows in WHM > List Accounts?
     
  7. kapilkd13

    kapilkd13 Member

    Joined:
    Jun 9, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    delhi
    cPanel Access Level:
    Reseller Owner
    hi Jcats,
    Yes when I ping the domain through terminal it shows my server ip. This is the same IP that is shown in list accounts. but when I put the domain on google it takes me to defaultwebpage.cgi . It looks like domain is resolving to server IP but from there it is not getting redirected to specific account associated with that account. Again IP present in List accounts and my server IP is same. And in list accounts IP is hyperlinked and takes me to its respective accounts default.html page(where I want to go.)
     
  8. kapilkd13

    kapilkd13 Member

    Joined:
    Jun 9, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    delhi
    cPanel Access Level:
    Reseller Owner
    Also if its possible for you can you suggest me sources where i can get insight of how a server resolves request to there specific account mainpage because each website doesn't have a dedicated ip and user request go to server's ip.
     
  9. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    252
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Did you set same hostname as your main domain name? If that was the case, you will have to delete any recreate your domain after changing server's hostname. The hostname which you set for your server should not be live website. You will see this caution on change hostname screen as well.
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    First, check to see which IP address one of the domain names resolves to, and verify it's the same IP address configured for the account on the cPanel server. Then, let us know the output (without real IP addresses) from the following command:

    Code:
    /scripts/build_cpnat
    Thank you.
     
Loading...

Share This Page