NameSilo

Domain Parking to Branded Nameservers

Labeled as advice in General Domain Discussion, started by Szabolcs Szekely, Jun 19, 2021

Replies:
22
Views:
827

  1. Szabolcs Szekely

    Szabolcs Szekely Established Member

    Posts:
    602
    Likes Received:
    100
    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 ;)
     
    The views expressed on this page by users and staff are their own, not those of NamePros.
  2. DirkS

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    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: Jun 19, 2021
  3. Gube

    Gube 48hr - Nouv VIP

    Posts:
    925
    Likes Received:
    1,454
    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)
     
    Last edited: Jun 19, 2021
  4. DirkS

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    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 :)
     
  5. Gube

    Gube 48hr - Nouv VIP

    Posts:
    925
    Likes Received:
    1,454
    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.
     
  6. DirkS

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    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.
     
  7. Szabolcs Szekely

    Szabolcs Szekely Established Member

    Posts:
    602
    Likes Received:
    100
    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: Jun 21, 2021
  8. Gube

    Gube 48hr - Nouv VIP

    Posts:
    925
    Likes Received:
    1,454
    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 :)
     
  9. DirkS

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    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 ;)
     
  10. Szabolcs Szekely

    Szabolcs Szekely Established Member

    Posts:
    602
    Likes Received:
    100
    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!
     
  11. Gube

    Gube 48hr - Nouv VIP

    Posts:
    925
    Likes Received:
    1,454
    I had tried cloudns, but it turned out to be quite expensive for what I wanted to do.
    In the end, I self-hosted with very cheap OVH public cloud instances, for about 3€ per month per instance.
    That gives me more flexibility and it's a lot cheaper.
     
  12. DirkS

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    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: Jun 21, 2021
  13. b2betrade

    b2betrade Established Member

    Posts:
    347
    Likes Received:
    173
    @Szabolcs Szekely
    I have already done this
    Check
    AuctionsProperty.com
    Liquorbasket.in

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

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    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.
     
  15. b2betrade

    b2betrade Established Member

    Posts:
    347
    Likes Received:
    173
    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: Jun 21, 2021
  16. b2betrade

    b2betrade Established Member

    Posts:
    347
    Likes Received:
    173
    And each domain resolves it's own secure SSL certificates
     
  17. Gube

    Gube 48hr - Nouv VIP

    Posts:
    925
    Likes Received:
    1,454
    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.
     
  18. Future Sensors

    Future Sensors 78% of human domainers will be replaced by robots Gold Account

    Posts:
    1,672
    Likes Received:
    5,952
    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: Jun 21, 2021
  19. DirkS

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    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.
     
  20. Beatri

    Beatri New Member

    Posts:
    8
    Likes Received:
    1
    Pretty interesting. Need to try
     
  21. Szabolcs Szekely

    Szabolcs Szekely Established Member

    Posts:
    602
    Likes Received:
    100
    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?
     

    Attached Files:

    Last edited: Jul 13, 2021
  22. DirkS

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    Fix your glue records.

    Edit: and before testing anything, decrease the TTL so it will get propagated faster. Set it to 300 or something then increase it again when stuff Is working unless you have some advanced failover mechanism set in place which might require a low TTL.
     
    Last edited: Jul 13, 2021
  23. DirkS

    DirkS Dutchman.info VIP

    Posts:
    7,156
    Likes Received:
    6,239
    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...
     

Want to reply or ask your own question?

It only takes a minute to sign up – and it's free!
NameWorth
  1. NamePros uses cookies and similar technologies. By using this site, you are agreeing to our privacy policy, terms, and use of cookies.
    Dismiss Notice
Loading...