I want to implement something like Tumblr or WordPress by giving user the option to have their domain name point to their profiles. For instances user go to their domain registrar and the IP of my server so then: http://www.usersdomain.com will point to http://www.mysite.com/userid without actually forwarding so that domain name will still show in the address bar.
I wish you can describe the details for steps of doing so.
I’m using Ruby on Rails if that’s make a difference. My production environment has Nginx and Passenger.
My point of view:
Hostheader. That header allows us to make such thing as virtual hosting: many and many hosts can point to only one IP;Hostfrom the request and query your database for user with such host.For example, IP of your service is 100.100.100.100, my domain is redsocks.com. I need to change DNS (an A record) of my domain to point to your IP. Supposedly, I did.
When I point my browser to my domain, the browser makes the following request (or similar) to your own IP, not mine:
Your application has the code (pseudocode) that deals with my request:
And I see my very own page within your service on my domain.