-1

I have a multi-tenant app where the user gets a subdomain youraccount.myapp.com that works fine. I have some customers who want to be able to have their own domain that redirects to the subdomain. So something like foobar.com --> youraccount.myapp.com. I'm pretty sure I've got the logic down in my app, but I have no idea how to test this on the DNS CNAME side of things. I don't want to launch this feature without seeing it work locally.

I feel like adding a host entry isn't going to test the logic, but maybe I'm wrong? Anyone know how to test this?

JoeCianflone
  • 682
  • 4
  • 18

1 Answers1

0

You cannot have any other records together with a CNAME.

Since a "domain name", i.e. a "zone cut" where the parent zone contains NS records pointing to the delegated domain, must have an SOA record (and probably its own copies of the NS records, plus any other relevant and necessary records), it cannot also have a CNAME.

So the only way for the customer's own domain to point to the app subdomain would be for their domain name to also have an A record that points to the same address as the youraccount.myapp.com record points to.

The best they can do is to have their own subdomain that points to your subdomain, e.g. (using your example names):

app.foobar.com.  IN CNAME  youraccount.myapp.com.
Greg A. Woods
  • 2,663
  • 29
  • 26