I am trying to host my first website + service.


#My server setup

I have a static webpage in server 1. A gotosocial installation in server 2. They are connected to a reverse proxy (server 3). This has a public IP of (not exact) 204.230.30.104.


#My router setup

I can open ports 80 and 443. I just don’t know to which IP (I’ll explain why down).


#My registrar

In have a domain, say ‘newexample.com’. The @ has an A record for the IP (not exact) 208.145.80.33


#My confusion

  1. If I want to make a subdomin for GoToSocial like ‘gts.social.new example.com’, do I use CNAME or A record?
  2. If I want to serve the static website to be served at ‘www.newexample.com’ , do I remake an A record for www.newexample.com ?
  3. There appears to be a CNAME in my DNS record already by the registrar for www that goes to some “redirect” link. What’s up with that?
  4. How do I make the domain connect to my server and how to make the server connect to my domain properly?
  • Darkassassin07@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    10 hours ago

    If you have a static IP address, you can just use A records for each subdomain you want to use and not really worry about it.

    If you do not have a static IP address, you may want to use one single A record, usually your base domain (example.com), then CNAME records for each of your subdomains.

    A CNAME record is used to point one name at another name, in this case your base domain. This way, when your IP address changes, you only have to change the one A record and all the CNAME records will point at that new IP as well.

    Example:

    A example.com 1.2.3.4

    CNAME sub1.example.com example.com

    CNAME sub2.example.com example.com

    You’d then use a tool like ACME.sh to automatically update that single A record when your IP changes.