0

I have a heroku app set up on a .app TLD, and a custom domain through GoDaddy.

What I would like is to have something like this:

myapp.example.com resolves to my app, and does not redirect.

What I am currently experiencing is:

myapp.example.com redirects (with a 307) to my-example-app.herokuapp.com

What I have done:

Following the Heroku guide for custom domains, I've done heroku domains:add myapp.example.com -a my-example-app and also added a cname to though the Godaddy UI for my domain.

CNAME myapp some-heroku-dns-somehash.herokudns.com

Any help, advice or pointers would be appreciated.

Edit: The 307 redirect is just due to the app redirecting to /sign-in. The issue that I am trying to resolve is using the custom domain, and not the heroku domain.

Drew Ogryzek
  • 350
  • 3
  • 17
  • 1
    This may be caused by your own code, which thinks it's running on the Heroku domain. When the auth redirect happens it's just building the wrong target URL. What technology is your app built in? – ChrisGPT was on strike Dec 17 '18 at 20:48
  • Hi @Chris - you are correct! The base URL was hard-coded in an ENV Var, and has since been resolved. Not sure whether to delete question, or mark as resolved. – Drew Ogryzek Dec 18 '18 at 22:50

1 Answers1

1

The 307 redirect is just due to the app redirecting to /sign-in.

This causes me to think that your application thinks it should build URLs using the Heroku domain instead of the custom domain.

Does your application have a place where its domain is configured? You might just need to update that setting so it can build own URLs using the proper domain.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257