user5496955
user5496955

Reputation:

How to add subdomains in heroku in rails

I have an app in ruby on rails which have multiple subdomains which on localhost are like this

manager.daycare.no:3000/
worker.daycare.no:3000/
daycare.no:3000/
admin.daycare.no:3000/
parent.daycare.no:3000/

Now I want to add these on heroku. How I add these sub domains on heroku?

My heroku-app name is sufa-travels.herokuapp.com/

Upvotes: 3

Views: 1422

Answers (2)

7urkm3n
7urkm3n

Reputation: 6321

As I know, you cannot choose specific ports for configure your host in Heroku, also Heroku not supports DNS. But you can add custom domains and subdomains, and from your domain hosting settings, redirecting to Heroku app. Here is little shot from youtube Youtube

Heroku Doc says: Docs

$ heroku domains:add www.example.com`
Adding www.example.com to example... done
>
$ heroku domains:add blog.example.com`
Adding blog.example.com to example... done

Upvotes: 2

polskais1
polskais1

Reputation: 186

You can add a subdomain by using the heroku domains:add command.

https://devcenter.heroku.com/articles/custom-domains#add-a-custom-domain-with-a-subdomain

Upvotes: 1

Related Questions