4 ms·
I have done it. That is not my question. Lets say I have a webapp travelR.com and you create your pages senthil.travelR.com and you also buy domain senthil.com.
by morbidkk 18y ago
I have done it. That is not my question.
Lets say I have a webapp travelR.com and you create your pages senthil.travelR.com and you also buy domain senthil.com.
How can I automate senthil.com 's pointing to senthil.travelR.com programatically.
Earlier answer mentioning myDNS helps. up voted
- samt 18y agoHow can the service provider point senthil.com to the subdomain? Can't without domain ownership. Either they act as a domain reistrar or they provide instructions to create a cname record.
- ra 18y agoThere's two parts to the question. 1. How does senthil.com get to my server 2. How does my server know what to do with senthil.com 1. Can only be done by the domain owner. You need to instruct them to either: a) Point the domain to your nameservers (in which case you'll need to configure a DNS server, in this case the myDNS suggestion is a good one). or b) Have the domain owner setup an A record, pointing to our servers IP address (I assume you already have a dedicated IP - you'll need one). Question 2, how does your server know what to do with it's traffic? Well HTTP includes a HOST Header, which represent the hostname the user types into their URL bar. You'll need to look for this, and direct them to the appropriate mini-site. One way, as someone pointed out, is using Apache. So, you could either write out apache conf files and trigger reloads, or write some code in your app that looks at this header. Hope this helps.
- petercooper 18y agoYou first have to get the user to set up a CNAME from their domain to your app's server (in this case, senthil.travelr.com). Then your app needs to keep track of domain names versus users / sites and then serve up the correct information based on the Host: header.