Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

172
Visualizações
custom domain name per customer single page application

I want to give my customer the ability to create their own todos list app/web.

So, I thought they could register to my application, for instance: http://mytodos-app.com/signup and provide all preferences such as theme, title, name...

Now i could use the url/router ability to get some unique identifier from the url and use the same app, but fetch data for each customer.

i.e: http://mytodos-app.com/todos/:someuniqeid

1) is it sounds ok? or are there better strategies for this scenario?

2) if it's ok, If I want to give them the ability to configure their own domain (like in shopify you get some dynamic domain yourname.shopify.com).

So, what is the most popular/professional way to do it? I want it to be easy to the customer. any suggestions?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Other than the "cool factor", there is no benefit to using actual customized sub-domains.

You can synthesize the behavior by:

  1. In DNS, set up a wildcard CNAME entry for *.DOMAIN.com to point to www.DOMAIN.com, be sure to buy a matching wildcard ssl/tls certificate.
  2. Configure the web server to respond to all hostnames.

  3. After user registration. SANITIZE the username(or whatever identifier) value.

  4. Set an authorization cookie with the domain=DOMAIN.com option to force it not to be a host cookie.

  5. Redirect to username.DOMAIN.com. Same server different name.

  6. Check the cookie in the route to serve the correct pages. Just like you would with any login.

  7. If there is no cookie, use the host information to populate the username portion of the login page, or display public todos?

Make sure any Javascript scripts hosted on the site and all internal links are loaded by relative addressing.

The technique is much safer than actually creating real subdomains.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda