subdomain-localhost-rails-5.md Subdomaining Localhost with Rails 5 I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api Rails.application.routes.draw do constraints subdomain: "api" do scope module: "api" do namespace :v1 do resources :users end end end end So that you can have namespacing and version