Veerasundaravel's Ruby on Rails Weblog

November 13, 2011

Localhost alternates for subdomain

Filed under: Ruby On Rails — Tags: , , , , , , , , — Veerasundaravel @ 2:04 am

Most of we Rails developers, used to check our Rails app using http://localhost:3000/. But this particular url have the  following issues.

1. We can’t add/check subdomain with localhost like http://company1.localhost:3000/

2. Some of external API will not work when we are using localhost.

3. More over using system hostname for subdomain also requires too much configuration in host files.

Best way to solve this: and provides good option of using localhost with subdomain etc. The two domains are pointed to localhost only. If we go to we’ll see the homepage of our application because resolves to the IP address

Checkout all the below urls. all will open your application homepage.

Related Articles:

tbaggery – Smack a
ASCIIcasts – Subdomain in Rails3


  1. Very useful post. Thanks!

    Comment by Selvakumar — November 17, 2011 @ 2:33 pm

    • Thanks Selva and also for re-sharing this.

      Comment by Veerasundaravel — November 17, 2011 @ 2:37 pm

  2. Nuttige informatie, hier kan ik erg veel mee bedankt!

    Comment by Laverne Hint — November 25, 2011 @ 9:42 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply to Laverne Hint Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: