Hi guys!
I’m considering moving away from duckdns, as it’s becoming increasingly unreliable. I’d like to check some other free dynamic DNS alternatives (I’m open to suggestions!).
My idea would be to have the server run under two different domains, but both directing to the same services. Is this possible? What shoudl I change in nginx in order to answer to two different domains/names?
Thanks!
You just put both in the
server_name
line and you’re good to go.don’t forget the additional ssl cert for the second domain (assuming it’s not a wldcardable subdomain)
I switched from duckdns about a year ago as it failed to resolve the addresses for my jellyfin server. I ended up buying a domain from cloudflare for 3 years for about $4, and I self-hosted ddns updater to automatically grab the dynamic ip, and set it to a subdomain.
As for your nginx config, I’d imagine you could make 2 separate config files in
sites-enabled
that are nearly identical, but listen for different domains. Something like this:#config file 1 server { listen 80; server_name example_a.com; location / { return 301 http://example_c.com$request_uri; #or use an ip instead of example_c.com } } #config file 2 server { listen 80; server_name example_b.com; location / { return 301 http://example_c.com$request_uri; #or use an ip instead of example_c.com } } #Or use "proxy_pass http://example_c.com;" in the location tag instead of "return 301..." if you want to reverse proxy the traffic
Thanks. I’m seriously considering also a paid domain, so it’s good to hear from your experience. I might go try some other free provider first though.
In what sense is DuckDNS unreliable?
DNS cert renewal randomly stopped working for me.
It seems to frequently stop responding.
I was wondering the same, I’ve not had any issues personally
Glad it works for you guys. Here it fails to respond at least once a week or so, and it can last one hour or more sometimes. It’s unpredictable. And makes the server look buggy.
A sample for measure…there’s a lot of these on reddit:
https://www.reddit.com/r/selfhosted/comments/1cyru6p/duckdns_dns_servers_down/
I liked FreeDNS when I used them, but that was something like 10 years ago. Could be worth looking into.
Would recommend OVH for both domain name and DNS, they have DNS APIs so you can get certificates from lets encrypt with ease. Also you could update your zone when your home IP changes
I’m currently moving from duckdns to desec.io — with the hope of it being more reliable.
Great…thanks. I’m going to look them up.
This should be possible, in nginx you would just have near identical entries that deliver the same content. The service itself sometimes takes a domain to build internal links etc, and those usually only take one.