0

I have a registered domain (eg: www.mydom.example), a public IP and Server 2019. I need to set up my server in order to host my own website. I can currently browse my website externally via my public IP and this works fine.
I need help with linking my domain name (eg: www.mydom.example) to my server so that I can access the site using my domain name (eg: www.mydom.example).

I tried a few tutorials on how to configure DNS on the server, but I can't seem to find anything that works. I know I need to set up nameservers and A records and then get my domain to point to the server, but when I follow the tutorials on how to set the server all seem to be for internal networks.

Are there any tutorials or guides on how to go about doing this?

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43
M-Corp
  • 21
  • 5

1 Answers1

2

Who are you using to register your domain name? Some registrars have the option to serve DNS records.

If your domain registration provider doesn't provide DNS functionality, you'll have to either setup your own DNS servers (you want two for primary and secondary/backup) or find a DNS service provider. Your DNS registrar should allow you to specify name servers within their web portal. You want to point those two name server records to your DNS provider.

Then within your DNS provider, specify A records for your domain to point to your IP address (or AAAA records for IPv6 addresses).

Domain registrar -> DNS Server -> A records for example.com -> IP of your server

So to recap: there are three major pieces:

  1. Domain Registration
  2. DNS Service
  3. Web site or other Internet Service

You seem to have 1 and 3. You just need to setup your DNS records by finding a DNS service provider for 2. You then tell your domain registration provider to use that DNS server, and tell that DNS server to point to your web server.

djsumdog
  • 1,100
  • 2
  • 16
  • 29
  • 1
    Thanks for the advice. I did what you suggested, I changed the A record to point to my server and after 30min my site was accessible via the domain name. This was way simpler than I thought it would be. – M-Corp Aug 30 '21 at 19:10
  • 2
    I don't know what "Domain registrar -> DNS Server" does exactly mean, but at least if that is supposed to be the resolution path, this is incorrect. Through a registrar you set up who are the authoritative nameservers on your domain. As a registrar can be a DNS provider too, those authoritative nameservers can be the registrar ones, or those from any other DNS provider. Once that is done (and the parent publishes those `NS` records), the registrar does not take a role in any active DNS resolution (except of course if it is the DNS provider but the registration part does not take a role) – Patrick Mevzek Aug 30 '21 at 21:07