2
4 Comments

How to implement custom domain name feature?

Landing page creators like Carrd and Landen offer custom domain name as one of the paid features. How is it implemented? I'm not super familiar with the networking side of things. I'm not trying to build a competitor, I'm genuinely curious.

on April 7, 2020
  1. 2

    The user creates the domain record and points it to the DNS server that's serving up the landing pages. The server will then use virtual host to detect the incoming request, find the content for the specific subdomain/url and serve it up.

  2. 1

    They use a reverse proxy to check the Host header and redirect the request based on the domain name, I found a reverse proxy that you can change dinamically here https://github.com/Integralist/go-reverse-proxy

    1. 1

      If the request to a page has a user's custom domain in Host header, the proxy will redirect the request to username.carrd.co? Please let me know if my understanding is not 100% correct.