• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution

    How to connect a domain to a server?

    Hi, I was wondering if someone can help me get past what seems to be a very simple stage of server setup that I'm completely stuck on.

     

    I'm a developer working for a client who has a server (Gen3 VPS) and a whole bunch of domains with godaddy and we're trying to connect them up. I've tried everything I can think of, but I know almost nothing about DNS/nameservers/cpanel/whm and I can't even get one domain directing to a static page.

     

    So what I thought would be the right way is:

    • Add a cpanel account in WHM with one of the domains
    • It gives me the nameservers ns1. and ns2.secureserver.net
      • However, I can't seem to change the nameservers for the domains in the domain settings on godaddy, I get "an unexpected error has occurred" (very descriptive), so I guess you can't do this. I've also tried setting the nameservers both to the IP of the VPS but that gives the same error.
    • So instead, I use the setting "Use the nameservers specified at the Domain’s Registrar. (Ignore locally specified nameservers.)" in the account creation menu, because that just gives me the nameservers that are already set up for that domain and I don't have to deal with that error.
    • Still doesn't work. Visiting the domain gives me a white screen (though under further inspection there's google analytics code in there so it seems to be linked to something). Visiting the IP address gives me error: connection refused.

     

    I'm thinking maybe there's something I need to do in DNS zones in WHM? I don't know what I'm doing with that either though. I'm surprised that I haven't been able to find some documentation on this, because it seems like quite a basic thing that a lot of people would have to do, or maybe I'm just missing something really obvious?

     

    Thanks,

    Alex

     

    P.S. if it matters, our end goal is to have a python application (using aiohttp) running on the server and every domain directing to the same place (just aliases), so I actually don't even need any of the complicated cpanel things, or even apache because it'll just run on nginx. I just need to get the DNS stuff working and then I should be fine.

     

    1 ACCEPTED SOLUTION

    I believe your assumptions are correct.  By "default" I mean the nameservers that came with the registration, if you decide to go with WHM you would switch these to "custom" after they are setup.  Before that you would need to register the host names created in WHM (like ns1 and ns2), I believe this would be to the IP address of your server.

    https://www.godaddy.com/help/add-my-own-host-names-12320

    View solution in original post

    3 REPLIES 3
    Nate
    Super User I

    You could set the nameservers to default if you want to manage the DNS in the GoDaddy Domain manager.  Then point the domain to your server using an A record.

    https://www.godaddy.com/help/change-an-a-record-19239

     

    If you want to manage the DNS with WHM you can setup your own nameservers on your domain.

    https://www.godaddy.com/help/set-up-nameserver-dns-with-webhost-manager-whm-8467

    https://www.godaddy.com/help/find-my-gen-3-server-ip-address-12071

    https://www.godaddy.com/help/add-my-own-host-names-12320

     

    Hi, thanks for the reply - you say "if you want to manage the DNS in the GoDaddy Domain manager" - actually I think I don't? I just thought it was the only option but since it doesn't seem to work is there another option?

     

    By "default" do you mean the nameservers that WHM gives me or the ones that "come with" the domain?

     

    This link might be what I need: https://www.godaddy.com/help/set-up-nameserver-dns-with-webhost-manager-whm-8467

     

    However, what I don't understand here is if I set the nameservers for example.com to ns1.example.com and ns2.example.com, won't that be recursive? How will it ever get to my server? Also, if I do this, won't I also need to set the nameservers for the domain in GoDaddy? (which it won't let me do because it just gives me 'unexpected error')

    I believe your assumptions are correct.  By "default" I mean the nameservers that came with the registration, if you decide to go with WHM you would switch these to "custom" after they are setup.  Before that you would need to register the host names created in WHM (like ns1 and ns2), I believe this would be to the IP address of your server.

    https://www.godaddy.com/help/add-my-own-host-names-12320

    View solution in original post