Makzan / I share what I learned

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.

Published on 2015-09-28. More articles like this:
- Clip & Quote
- Ruby on Rails
- Web Technologies

Previous <- Link Indicator
Next -> Foundation 6 and CSS Preprocessor

📬 Subscribe to Makzan’s Weekly Dispatch

Want productive tips and web technologies links like this in your inbox each week? Sign up for weekly dispatch each week. No spam ever. Just useful content:

What to expect: If you wish to withdraw your consent and stop hearing from us, simply click the unsubscribe link at the bottom of every email we send or contact us at We value and respect your personal data and privacy. To view our privacy policy, please visit our website. By submitting this form, you agree that we may process your information in accordance with these terms.