Accepting Custom Domain in Rails

Link: Adding Support for Custom Domains in Rails

There are three main steps necessary for adding custom domain support to your Rails project:

  1. Have your users add a CNAME record pointing their domain to yours
  2. Update your routes to handle any custom domains.
  3. Add the controller logic to find resources using the custom domain

For this example, let’s assume your user wants to use their domain at to point to their blog hosted on your Rails app at

I clip this down for use in my upcoming page generator. It is based on Rails and will allow custom domain to point to the service.

I teach web design. I write books on HTML5 games development. I host classes on mobile web and app development. I made animation with Adobe Flash (now Animate).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.