Support Forums

Subdomains on different accounts

Hello, I have a couple questions about subdomain behavior.

For background, we deploy sites for clients on the domain name of their choosing and we occasionally see an “must be unique” error. After digging into it, we discovered that it only happens the following conditions are met:

  • The client is already hosting a site on their Netlify account using the base domain name (e.g. foo.com)
  • The client asks us to create a site with a subdomain (e.g. bar.foo.com)

While testing, we discovered some strange behavior:

Given teams A and B:

  1. A creates a site with the domain first.chan-ls.com - success
  2. B creates a site with the domain second.chan-ls.com - success
  3. B assigns the domain chan-ls.com to its site - success
  4. A assigns the domain third.chan-ls.com to its site - fails with “must be unique” error

A site name: goofy-edison-a022ae
B site name: chan-ls

Is this the expected behavior? Is there an easier way we can create a site using the subdomain on our team on behalf of the client? If not, is there a method that Netlify recommends to handle these sorts of situations?

This is indeed the result of a feature we have in place to protect folks who either:

  • host their primary domain on a site here (so, chan-ls.com in your example)
  • or, using our DNS hosting for their domain

…from having other customers attempt to reuse any of their hostnames.

I’d suggest that we need to hear from the mutual customer to remove this protection on your behalf, since we’d do you the same favor were someone trying to use your hostname in their account.

I’d recommend that you (or anyone on your team as shown on the members listing for your account) email support@netlify.com with any hostname(s) you’re having trouble using like this and we can work with the owners to confirm your re-usage of them, and then we can configure their account to share with yours.

I suppose that won’t work super well at scale, which I know you are working towards, but it is our current workflow. If we need to discuss something different for your particular use case, let me know this won’t be workable and we’ll fire up a helpdesk ticket to talk through possibilities with you privately. But, if you need it rarely like once a month or even once a week, this is likely what we’ll request of you since while we trust you, we do need to confirm that your customers approve of reuse they’re expecting our platform to protect them from :slight_smile:

1 Like

Thank you for your response! I will take this back to the team to discuss and if needed, we will follow up via email.

1 Like