Question about prod.exs

Hello.
I deployed my app( using umbrella app ) to heroku.

But I got an issue with custom address in heroku. The problem is when I launched my site, it shows me correct custom domain address (like www.example.com) But after login it must show “www.example.com/dashboard” but it shows me “www. whispering-hamlet-32114.herokuapp.com/dashboard” -> Heroku app address.
So I wonder what cause this problem (from heroku setting? Namecheap? or in my app)

In my prod.exs

config :myapp, Myapp.Web.Endpoint,
  load_from_system_env: true,
  url: [scheme: "https", host: "whispering-hamlet-32114.herokuapp.com", port: 443],
  force_ssl: [rewrite_on: [:x_forwarded_proto]],
  cache_static_manifest: "priv/static/cache_manifest.json",
  secret_key_base: Map.fetch!(System.get_env(), "SECRET_KEY_BASE")

Do I have to change host: "whispering-hamlet-32114.herokuapp.com" to my custom domain? likehost: "example.com" ??

Yes, the contents of :url is used to generate the sites base URL.

Ok So I did change it to actual domain name.

But strange thing is www.example.com is working and other address like www.example.com/sign-in
but https://www.example.com/sign-in/token is not working (connection timed out)
I am using passwordless sign in method by the way.

Oh ok I solved this problem by adding root domains in heroku and dns provider.
Thanks

1 Like

I’m just dropping in to say thank you for sharing the solution to your problem, once you figured it out. It might come in handy for someone else with a similar problem in the future.