S
S
systemiv2014-02-20 14:46:27
Domain Name System
systemiv, 2014-02-20 14:46:27

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

1 answer(s)
S
systemiv, 2014-02-20
@systemiv

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

everything is working!)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question