My colleague and I were working on a feature to apply dynamic subdomain name in one of our rails apps. Since a lot of documentation out there only focus on how to host subdomain app by configuring the /etc/hosts file. I reckon I share some insight on how to actually enable dynamic subdomain in your production site using the trusted ol’ Apache web server.
The subdomain-fu gem is such a powerful and convenient gem. From it’s documentation
SubdomainFu provides a modern implementation of subdomain handling in Rails. It takes aspects from account_location, request_routing, and other snippets found around the web and combines them to provide a single, simple solution for subdomain-based route and url management.
Since subdomain-fu has done all the heavy lifting for you. All you have to do once you deployed your subdomain-fu app is include a wildcard asterisk (*) at your DNS level to make your dynamic subdomain work at your production site. However, this approach may not work if you’re using free domain or free DNS.


Hi, As you should know Rails 3 support sub-domains, but About your explanation about subdomain-fu.
Do you know if add a wildcard asterisk (*) at your DNS level, at this momment is the unique solution to support dynamic domains using subdomain-fu? for example in rails 2.3.5??
Thank you
sorry, i didn’t get u. Are u ask me a questions or explanation about subdomain fu?.
Hi Sorry,
The question is:
For example: Add *.example.com in the DNS is the unique solution to support dynamic subdomains using subdomain-fu?
Thanks