I'm working on a web service. I need a way to verify a user owns a domain they attempt to use in the service.
How can I verify when a user attempts to add a domain to the service that they own the domain?
I have a few ideas, but I'm not sure how secure they would be:
- Have them add a DNS record to the domain. Possibly a TXT record my service generates.
- Send an email to an account on that domain they specify with a validation link.
Any other ideas?