AWS Multiple domains pointing to same server

后端 未结 2 352
无人及你
无人及你 2021-01-07 11:18

I\'m building a solution that will be provided to several companies. Any company will have to point their domains (or just a sub-domain) to my server and then I\'ll handle p

相关标签:
2条回答
  • 2021-01-07 11:30
    1. Put Elactic Load Balancer in front of your application instance (even if you will use only one instance at the beginning).
    2. Using your domain (the zone does not have to be hosted on Route53), create one CNAME (or ALIAS) record (for example myapp.example.com) and point it to your load balancer's domain name.
    3. Simply tell your customers to CNAME their subdomain to your app dns name
    0 讨论(0)
  • 2021-01-07 11:39

    If a business I was looking to do business with told me I needed to create a new zone on my DNS to access an application, I would very quickly move my business elsewhere! Especially if they wanted control of that zone, there are big security issues in allowing that. You will almost certainly lose business if you make that a requirement.

    This is a commonly solved problem for thousands of businesses across the internet, you simply tell them to point their domain to your servers and you figure out which customer is which. Either by using something like the HTTP Servername field, or having some manner of authentication process that differentiates them from the other users.

    By far the simplest method is having a CNAME record that you point all of your customers to. Depending on your business model it can be useful to give each customer a custom CNAME, some random unique ID, so if you need to expand and move clients in future you can do them a number at a time.

    Look around at your competitors, or just generally around other businesses that have similar web models. Understand how they engineer their infrastructure and emulate that. But taking a whole DNS zone, is a really bad idea.

    0 讨论(0)
提交回复
热议问题