Answer the question
In order to leave comments, you need to log in
How to set up domain delegation on heroku.com?
Hello.
Please help me set up domain delegation on heroku.com.
At the moment I have the following settings: joxi.ru/TeoFU_3JTJCWWVtnm1I
But the domain answers: joxi.ru/c-oFUxjKTJAUR4X_toA
In the logs: joxi.ru/seoFUxjKTJAdVnQ5d3s
Please tell me who set it up.
Answer the question
In order to leave comments, you need to log in
In general, I figured it out myself.
Everything is done relatively simply, you just need to get to it.
We create two domains in heroku, with www and without www
. In the domain panel, we write:
www CNAME example.herokuapp.com.
and in the application (I have it on rails) we make a redirect:
constraints(:host => "www.example.ru") do
match "(*x)" => redirect { |params, request|
URI.parse(request.url).tap { |x| x.host = "example.ru" }.to_s
}
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question