Custom Domains in a Rails Application

I want users of my service to be able to add their own domains. For example, www.[their domain].com must have access to the index of its application and the pages displayed. My service is implemented in Rails 3.

I have seen apps like Tumblr offer this functionality for their front-line blogs. Although I saw Rails applications that implement subdomains as Basecamp does, I did not find a resource for fully customizable domains.

+3
source share
1 answer

They will need to create an A record in their DNS to point to the IP address of your application server. You need to know which domain they pointed to your server and register it against your account, as well as configure your web servers in such a way as to forward requests from other domains to your application. You can then use the request object to search for your account in your application controller.

+7
source

Source: https://habr.com/ru/post/1435416/


All Articles