this post was submitted on 10 Apr 2024
13 points (88.2% liked)

Selfhosted

40132 readers
519 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I have a static ip (lets say 142.251.208.110).

I own the domain: website.tld

My registrar is godaddy.

If I want to change my nameserver godaddy won't allow me to enter a static ip. It wants a hostname. I observed that many use ns1.website.tld and ns2.website.tld.

I don't understand how this can work because ns1.website.tld would be served by my dns server which is not yet known by others.

Do I need a second domain like domains.tld where I use the registrars dns server for serving ns1.domains.tld which I can then use as the nameserver for website.tld?

I would like to avoid the registrars nameserver and avoid getting a second domain just for dns.

Thank you for your input.

you are viewing a single comment's thread
view the rest of the comments
[–] ptz@dubvee.org 3 points 7 months ago* (last edited 7 months ago) (1 children)

No, you don't need a second domain.

You'll need to register your apex domain with a registrar and then check the option to use custom name servers. The only subdomains you'll need to configure are the glue records for your ns1 and ns2 name servers.

[–] TCB13@lemmy.world 4 points 7 months ago* (last edited 7 months ago) (2 children)

Assuming you've website.tld you just have to create two "child name servers"* eg. ns1.website.tld + ns2.website.tld and set their respective "glue records" (IP addresses). Your register needs to be able to create and publish those to the zone above for it to work. Not sure if that's the case with yours but it seems to be possible.

* The term "child name servers" is used by some providers to define those kinds of records and it may change from provider to provider.

I don’t understand how this can work because ns1.website.tld would be served by my dns server which is not yet known by others.

That's because they aren't served by your DNS server. Remember the "publish those to the zone above for it to work"? What happens is that your domain registrar has to publish your glue record to the TLD zone.

If you run dig +trace +additional google.com SOA you'll see:

  1. Ding asking a root dns server (xyz.gtld-servers.net) who's the name server for google.com
  2. Root server will provide you with NS record naming ns4.google.com.
  3. ... and also return A record for that name, 216.239.38.10. That’s the “additional” response that serves the glue record.

Then dig will proceed to call 216.239.38.10 and ask what's the record for google.com. That's how DNS and glue records work and also why it isn't a circular dependency like you were thinking it was.

[–] raldone01@lemmy.world 2 points 7 months ago

Thanks for a all the details. Makes perfect sense. I got it to work!

[–] ptz@dubvee.org 1 points 7 months ago (1 children)

Isn't that what I said? (genuinely asking). That's exactly how mine are all setup.

[–] TCB13@lemmy.world 1 points 7 months ago* (last edited 7 months ago) (1 children)

~~OP asked "Do I need a second domain" you answered "AFAIK, yes." even though you proceeded to contradict yourself :) Maybe you can remove the "AFAIK, yes." from the comment?~~

I actually updated the answer to be more descriptive informative meanwhile.

[–] ptz@dubvee.org 1 points 7 months ago (1 children)

My bad. Didn't see "second" domain.

[–] TCB13@lemmy.world 1 points 7 months ago

NP. Updated accordingly.