Domain to sub domain pointer.

Hello Friends,

I have a requirement where a user can
configure there own domain.

For example

We will provide a subdomain to every
user who will get registered to our site.

For e.g

But if the user already have a domain
for example he can point that subdomain to

So when someone access
internally he should redirect to

Please help me to configure the system



Maybe use awesome plugin:

Let’s say my domain is ‘’. Here are some
examples of the use of the :subdomain option:

url_for(:controller => “my_controller”,

:action => "my_action",
        :subdomain => "awesome") # => [](

hello tommy

Thanks for your reply, But I guess I should be more detail with my requirement.

We are providing a service where a user can sign up and have there blog and by default we will provide a separate subdomain to ever user but if user wants they can replace with there domain

for e.g. which will be actually a pointiing to

thanks for any help.

Abhishek Shukla