nthvision wrote:
if All I need to do is write the app
I never said it's all you need to do.
The world wide web works roughly like this:
1) A person types an address into their browser, or they click on a link.
2) The browser figures out which server is responsible for handling the domain. This is what the A record does: it's like a phonebook for the internet.
3) The browser connects to the server, tells the server which domain it wants, along with a bunch of other information.
4) The server listens to the browser and decides what content to send, based on the information provided by the browser.
5) The server sends the content to the browser.
6) The browser shows the content to the person.
If the website is on your own domain, you control everything from step 2 to 5. But your case requires at least two parties to cooperate. After all, you can't control A records on other people's domains, and other people can't control the behavior of your server.
The A record must be changed
on the domain owner's side so that other people who type their domain will be directed to your server. (Step 2)
The app must be set up
on your side so that your server knows whose profile to display once other people are connected to it. (Step 4)