Namers
Namecheap

Szabolcs Szekely

Established Member
Impact
102
I'm looking to learn more about how to host domains at custom DNS servers using Branded Nameservers.

I would like 100's of domains to resolve to a default site/landing page I have setup. Without having to add each domain as an alias. Also without having to point the A records to the IP Address.

Would just like any domain pointed at my DNS to resolve to a default site.
ns1.mydomain.com
ns2.mydomain.com

Same we would do when pointing our names to BrandBucket, Dan or Brandpa and it resolves and redirects to the landing page automatically.

Any suggestion around this topic is much appreciated. Developers idea are welcome ;)
 

branding

Formerly @DirkS
Impact
6,886
I'm looking to learn more about how to host domains at custom DNS servers using Branded Nameservers.

I would like 100's of domains to resolve to a default site/landing page I have setup. Without having to add each domain as an alias. Also without having to point the A records to the IP Address.

Would just like any domain pointed at my DNS to resolve to a default site.
ns1.mydomain.com
ns2.mydomain.com

Same we would do when pointing our names to BrandBucket, Dan or Brandpa and it resolves and redirects to the landing page automatically.

Any suggestion around this topic is much appreciated. Developers idea are welcome ;)

Easy.... You can use your hosts API, that will make you however rely on them. You could just use cloudflare (payed) and update your domains through their API... Some solutions there.

Or...

Set up 2 nameservers, configure them to return the same A record for any query, pointing to the ip of your server that's hosting the lander (kinda like an open resolver). Configure the lander server to serve on demand TLS, make your lander dynamic so it will display the requested domain on the lander.
 
Last edited:

branding

Formerly @DirkS
Impact
6,886
Or just setup a (few) DNS server, it's how it works at 48hr.com :)
(Same A record for all domains - Then the final redirect is done with a web server but it could be a parking page instead)

I would typically use a reverse proxy to do this, take care of certificates, and direct traffic to different landers depending on the configuration. Dan does the same, bit more complicated setup but similar architecture.

Out of curiosity, what DNS server software do you use for 48hr? I have some running MaraDNS (old but does the job) and some Powerdns. Lots of flexibility with pdns but always looking for better solutions :)
 

Gube

Top Contributor
Impact
1,453
Out of curiosity, what DNS server software do you use for 48hr?
A traditionnal Bind9 configured in a relatively unusual way (to respond the same zone to all queries it receives).
This is deployed at OVH Cloud in two different DCs, but it's actually possible to add more instances, even from different providers, to increase resiliency.
 

branding

Formerly @DirkS
Impact
6,886
A traditionnal Bind9 configured in a relatively unusual way (to respond the same zone to all queries it receives).
This is deployed at OVH Cloud in two different DCs, but it's actually possible to add more instances, even from different providers, to increase resiliency.

Thanks. I abandoned bind years ago as I find it a bit resource heavy, nevertheless, good setup. Using ovh as well, can't go wrong with them when you want to deploy some DNS servers.
 

Szabolcs Szekely

Established Member
Impact
102
Thanks very much @Gube and @DirkS for your quick answers!

According to my understanding and some more advice:

1. I would have to have nameservers routed to a central webserver(s)

2. Use listening rules in those webservers to redirect based on the requested hostname.

3. Using Nginx to achieve this.

Does this looks easy to be set/achieved? If anyone can give me a help I'm open to compensate the invested time for that.
 
Last edited:

Gube

Top Contributor
Impact
1,453
Yes, basically you create nameservers at the registry, they will ask you an IP to do it. This IP will be the one(s) of your DNS server(s). (I'm doing it with two, one in Canada and one in Germany but the limit is 10 per nameserver)
That DNS server would respond the same A record to all queries.
And the server behind that A record could have Nginx + PHP to do the redirect or just Nginx if you use variables in your vhost.

Happy to help you with the setup :)
 

branding

Formerly @DirkS
Impact
6,886
Thanks very much @Gube and @DirkS for your quick answers!

According to my understanding and some more advice:

1. I would have to have nameservers routed to a central webserver(s)

2. Use listening rules in those webservers to redirect based on the requested hostname.

3. Using Nginx to achieve this.

Does this looks easy to be set/achieved? If anyone can give me a help I'm open to compensate the invested time for that.

That's basically it. Not to hard to set up. If you have some experience you can probably setup a LEMP stack. Setting up the DNS servers requires a bit of a learning curve if it's your first time. And of course you'll need to secure those servers so they don't get hacked :)

Ovh is a good cost effective option. Couple of instances (2 DNS, 1 Webserver) spread globally does the trick.

While you're at it, you can add TXT records as well so you will never have to worry about ownership verification again at venues like Dan, Sedo. Could also add catch all email, I'd set spf as well to prevent unwanted use. The sky is the limit with a custom setup. Ask @Gube to give you a hand ;)
 

Szabolcs Szekely

Established Member
Impact
102
Awesome! I'm trying to get the first half-part ready by myself using cloudns.net where vanity name servers are included in the free tier, and hope this does the job as expected, alternatively I'm open to go with OVHcloud based on your mention, but I'm not sure where it would lead the dns server hosting there in terms of pricing.

upload_2021-6-21_10-32-48.png


Thanks for your help, I highly appreciate that!
 

branding

Formerly @DirkS
Impact
6,886
Awesome! I'm trying to get the first half-part ready by myself using cloudns.net where vanity name servers are included in the free tier, and hope this does the job as expected, alternatively I'm open to go with OVHcloud based on your mention, but I'm not sure where it would lead the dns server hosting there in terms of pricing.

View attachment 193560

Thanks for your help, I highly appreciate that!

The vps starter should be sufficient which comes at $3.5/month. So basically it'll set you back about a tenner a month.

You would not need a DNS host like cloudns. Basically your become your own DNS host with the setup discussed. That's what gives you the ability not having to add records all the time.

Cloudns will give you just a couple of zones if I remember right and would come with a lot of editing/adding all the time. For what you want to achieve DNS hosting providers are way too expensive unless you can offset that against thousands of domains.
 
Last edited:

branding

Formerly @DirkS
Impact
6,886
@Szabolcs Szekely
I have already done this
Check
AuctionsProperty.com
Liquorbasket.in

Using nameservers
ns1.nameshop.org
ns2.nameahop.org

Nice. You may want to add some resilience to your setup as by the looks of it everything is on one server. The moment there's a hickup everything goes down.
 

b2betrade

Established Member
Impact
180
Nice. You may want to add some resilience to your setup as by the looks of it everything is on one server. The moment there's a hickup everything goes down.
I have tested with 250+ domains parking on that nameservers for more than 1 year without any problem.

Now optimising with some additional features so there is only 2 names hosted on it.
 
Last edited:

Gube

Top Contributor
Impact
1,453
I have tested with 250+ domains parking on that nameservers for more than 1 year without any problem.

Now optimising with some additional features so there is only 2 names hosted on it.
This is not the issue. Your nameservers are pointed to one IP only (164//68//117//127) so if that goes down, all DNS requests to your names will fail until that server is back online.
Plus, using only one server is not ideal because users in one place might have a really high ping to that server. While with multiple servers, the latency is lowered to the closest DNS server.
 

Future Sensors

78% of human domainers will be replaced by robots
Impact
9,229
This is not the issue. Your nameservers are pointed to one IP only (164//68//117//127) so if that goes down, all DNS requests to your names will fail until that server is back online.
Plus, using only one server is not ideal because users in one place might have a really high ping to that server. While with multiple servers, the latency is lowered to the closest DNS server.

I agree with the first part - and with the second part in general.

The algorithms for selecting the best, or fastest, nameservers is different for all implementations, and many variables are at play in the overall resolving process.

For this user, just choosing two different IPs in different netblocks (even better: in two different BGP ASNs) will improve the situation for resilience reasons. For better performance, there are indeed more advanced CDN, GeoIP and GeoDNS solutions available. However, GeoIP/GeoDNS is not perfect. Users will not always be routed to the fastest possible servers. Furthermore, when you implement this, you have to do this for all protocols (also for the webserver) to have the most effect.

The most important question is perhaps: will the user arrange this himself with his own solutions, or will he use platforms that have already arranged this well worldwide, and have a lot of experience in this.

https://mattgadient.com/i-tested-geodns-vs-anycast-for-websites-so-which-one-is-better/

https://en.wikipedia.org/wiki/Anycast
 
Last edited:

branding

Formerly @DirkS
Impact
6,886
I agree with the first part - and with the second part in general.

The algorithms for selecting the best, or fastest, nameservers is different for all implementations, and many variables are at play in the overall resolving process.

For this user, just choosing two different IPs in different netblocks (even better: in two different BGP ASNs) will improve the situation for resilience reasons. For better performance, there are indeed more advanced CDN, GeoIP and GeoDNS solutions available. However, GeoIP/GeoDNS is not perfect. Users will not always be routed to the fastest possible servers. Furthermore, when you implement this, you have to do this for all protocols (also for the webserver) to have the most effect.

The most important question is perhaps: will the user arrange this himself with his own solutions, or will he use platforms that have already arranged this well worldwide, and have a lot of experience in this.

https://mattgadient.com/i-tested-geodns-vs-anycast-for-websites-so-which-one-is-better/

https://en.wikipedia.org/wiki/Anycast

You can fairly easy use failover ips at OVH to attach to a live server when one goes down. It's not ideal but limits your downtime considerably.

Best imo, is using anycast but that gets costlier. May be worth it, depending on how important it is to you.

And stuff does go down. One of my setups was hanging by a thread not too long ago when one of my DNS servers was lost in the OVH fire and the other one was being DDOSed into oblivion :). Bad luck but it does happen, that's why I prefer a cluster of at least 3.

Another thing to consider, use multiple domains for your DNS. In case you miss renewal or it gets blocked for whatever reason it won't bring your infra down :).

Easydns has some cool features as well when you have your domains registered with them...

Lastly, from a practical pov, some registrars just wont let you use 2 name servers using the same IP.
 

Szabolcs Szekely

Established Member
Impact
102
Thanks for everyone for the excellent advice, especially for @Gube who helped me to set up 2 instances with OVH running bind + nginx.

Unfortunately, none, brandshore.com or any of the pointed names such as brandshore.pro (a none dot com) are resolving correctly or fully after many days of nameservers update.

This is what I have configured so far:

First Server 135.125.234.42:

/etc/bind/db.brandshore.com

upload_2021-7-13_14-57-2.png


/etc/bind/db.brandshore-main.com

upload_2021-7-13_14-57-53.png


Second Server 192.99.68.179:

/etc/bind/db.brandshore.com

upload_2021-7-13_15-0-16.png


/etc/bind/db.brandshore-main.com

upload_2021-7-13_15-0-54.png


Bind, nginx all active, no errors when digging the NS, restarted the server, updated the serials, increased TTL, checked the statuses etc and the propagation map never showed all green checkmarks yet, however .coms are performing better.

upload_2021-7-13_14-52-37.png


Non .com's are worst.

upload_2021-7-13_14-53-39.png


I've even replicated the configs on 2 AWS instances and compared with OVH using dnhere.com beside brandshore and it performed the same.

I couldn't figure out what else missing, any thoughts?
 

Attachments

  • upload_2021-7-13_14-44-11.png
    upload_2021-7-13_14-44-11.png
    84.8 KB · Views: 16
Last edited:

branding

Formerly @DirkS
Impact
6,886
At first glance... Set your glue records (registered nameservers) at your registrar like this:
NS1... to 135...
NS2.. to 192...

In your zonefile for brandshore.com add A records for NS1... to 135... And ns2... to 192... Also add an A record for brandshore.com to 75... And a cname record for www.brandshore.com to brandshore.com.

For any domain using your nameservers set:
A record to 75...
And ns records: Ns1... And NS2...
 
Name Worth
Top Bottom