Virtualhost conflict between users

Hi all

I could really use your expertise on a situation I encountered. Consider the following scenario:

  1. User A adds example.com virtualhost with DNS and email support without having registered it.
  2. User B registers example.com, configures the nameservers correctly, tries to add it and, naturally, fails to do so.
  3. User A ends up controlling the services (http, email etc) provided by example.com even though they don’t own it

All this happens on my custom platform utilizing the api. I’m trying to come up with a resolution flow that doesn’t involve human intervention.

Any thoughts?

Side note: Since domains and virtualhosts are unique to servers and not users, wouldn’t it be redundant to include the user parameter in api/cli calls that don’t involve creation?

You can’t prevent it other option is a crashing server …

Check if tUser A controls the domain otherwise remove it…

No no, I don’t want to prevent it. I can understand that, from the server’s perspective, everything works as expected. As I said, I need to be able to resolve situations like that programmatically. In other words, check if A owns the domain, as you said.

To your point, how does one check that? Can B authenticate his domain somehow?

Create a random string, ask the owner of the domain to enter that string in a DNS TXT record, and verify.

1 Like

Yea, that’s what I thought initially…

Except, that has to be done at the registrar level. And all registrars that I know of, don’t let you manipulate dns records unless you change the domain’s nameservers to their own.

Create the domain anyway and verify after the domain has been switched to the DNS. If not with in 3 days delete it again…

There are no other options for it really

I guess so…

Well, thanks! :slight_smile: