Host Subdomain on another Host

Discussion in 'Site & Server Administration' started by rhoniedotcom, Jan 4, 2011.

  1. #1
    I know this has been asked in the past, and I am asking again. I have a website that I want to host on a subdomain. My domain is sample.com, and I want to host home.sample.com on another host. I have changed the A record to the new host IP address. I was not the one that set up the home.sample.com website, the hosting provider did it. Is there anything I am missing? It will not promulgate, and I was wondering if anyone had a clue why?
     
    rhoniedotcom, Jan 4, 2011 IP
  2. jazzcho

    jazzcho Peon

    Messages:
    326
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To work you must:
    a) Correctly set the A record on the DNS Server. (your job)
    b) Correctly set up the web server on the new host to understand it needs to server your site. (your hosting company 's job)
     
    jazzcho, Jan 4, 2011 IP
  3. rhoniedotcom

    rhoniedotcom Well-Known Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    I am set up on the web hosting server. Is there anything different they need to do to host the subdomain, because apparently they don't know if there is.
     
    rhoniedotcom, Jan 4, 2011 IP
  4. Aquarezz

    Aquarezz Notable Member

    Messages:
    3,009
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    225
    #4
    What does your hosting company say when you ask them this question?
     
    Aquarezz, Jan 4, 2011 IP
  5. rhoniedotcom

    rhoniedotcom Well-Known Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #5
    They say it is set up correctly. I know my a-record is correct and the hosting company set up the subdomain, but I have a feeling it has to do with the dns, I have tried to find out with a google search, but that has not helped me. Both have cpanel installed, but the hosting company does not have anyway to get into it server records.
     
    rhoniedotcom, Jan 4, 2011 IP
  6. jazzcho

    jazzcho Peon

    Messages:
    326
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Say your site is test.com

    On the new host, on cpanel, create an account for test.com like normally but do not point the dns for it (so that it stays on the old host)
    On the newly created Cpanel account, create a subdomain normally. Create the A record for the subdomain to match the ip you configured on cpanel.
     
    jazzcho, Jan 4, 2011 IP
  7. rhoniedotcom

    rhoniedotcom Well-Known Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #7
    I will give it a try.
     
    rhoniedotcom, Jan 4, 2011 IP
  8. rhoniedotcom

    rhoniedotcom Well-Known Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #8
    I have another question. Do I use the ip address of my domain, or the ip of the subdomain in my host a record?
    (In other words do I use the ip address of test.com or the subdomain.test.com ip?
     
    rhoniedotcom, Jan 4, 2011 IP
  9. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #9
    That would concern me if they were my host. If they don't know such a simple thing you have to question their competence.


    Both, the IP for "test.com" AND the IP for "subdomain.test.com". You need A records for both of them.
     
    RonBrown, Jan 4, 2011 IP
  10. rhoniedotcom

    rhoniedotcom Well-Known Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #10
    Alright lets try this again. I have the ip address in the test account (subdomain.test.com pointed to the new host ip address)
    Now I have asked them to create a test.com with no dns added to it. And have asked them to make a subdomain that is subdomain.test.com and have them to make an a record that points to their ip address.
    I do not have access to the a record in that cpanel, so they have to do it.
    What I am asking is in their a record they point the a record to my ip address or theirs? I would suppose it would be theirs, and if this is correct, the only thing I can see is that they did not set up a top account. When I log in I only see subdomain.test.com, and their ip address attached to it. I see no DNS on the side panel of the cpanel, just the ip address.
     
    rhoniedotcom, Jan 4, 2011 IP
  11. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #11
    Host A needs to create you a web hosting account for sample.com and you need to point your nameserver records to the nameservers that they provide (there are other options but keeping this simple) at this point you are using just 1 host and all is working for the main domain.

    Host B needs to create you a web hosting account for home.sample.com and provide you with the IP address that the account is bound to. You need to provide this IP address to host A and have them to create the DNS record home.sample.com. A 1.2.3.4, where 1.2.3.4 is the IP provided by host B.

    Once that is done it all just works, if it doesn't then I'd need the real domain to understand what is/isn't happening but doing what you want is quite common place.

    On host B your account would be home.sample.com you would not have a sample.com account or entries from that as it's redundant because that is controlled by host A. On host A you only see the top sample.com and there is no mention of home.sample.com beyond the A record in DNS.
     
    tolra, Jan 4, 2011 IP
  12. rhoniedotcom

    rhoniedotcom Well-Known Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #12
    Now the story is like this. Both web host claimed they did everything right, after asking them to check again, it just started working about 15 minutes later. Now, I find it hard to believe that it took over 24 hours for it to promulgate through the web, even though I have read some post from 2006 that said it may take that long. Bottom line is that it is working now, finally.
    Seems to me all that would need to happen is that you need to create an a record, like I did for the subdomain in your main hosting account, and point that to the ip address that your subdomain's host account. Is that it? Anyway, again it is working now. One more question, how many a records can you produce for one hosting account for subdomains? Does anyone know? Is it a couple or can you make a hundred?
     
    rhoniedotcom, Jan 4, 2011 IP
  13. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #13
    Pretty Much. Easy once you understand it.

    As many as you want. but you don't want your DNS record to get too big.

    What we do is we create a wild-card DNS record with the IP pointing to the same IP as the www. site. That means that any subdomains you add will automatically be directed to the same server as your main site is located.

    Any subdomain that we set-up on another server has new A record added to the DNS record of the main domain with the IP of the server that sudomain is located on.


    DNS records can take a long time to propogate. Most new records propogage relatively fast, but 72 hours is still common for some ISPs.
     
    RonBrown, Jan 5, 2011 IP
  14. cipals15

    cipals15 Well-Known Member

    Messages:
    1,085
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    100
    #14
    A records are for sample.com
    CNAME recordsare for subdomainA.sample.com, subdomainB.sample.com, etc.

    If you want to host subdomainA on another webhosting company, you should put the following in the DNS Records (at the CNAMES section):

    subdomainA ; xxx.xxx.xxx.xxx ; 1 hour

    whereas

    xxx.xxx.xxx.xxx is the IP Address of the host while
    1 hour is the TTL.

    This is for domains bought on Godaddy.
     
    cipals15, Jan 8, 2011 IP
  15. cipals15

    cipals15 Well-Known Member

    Messages:
    1,085
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    100
    #15
    This is not always correct.

    test.com - set the A records.
    subdomain.test.com - set the CNAME records. (IP can be same with the A record or on another host)
     
    cipals15, Jan 8, 2011 IP