Why am I redirected to a different URL when accessing my custom domain?

Issue

When you access your application via its custom domain you are redirected to another URL

Resolution

Heroku does not perform redirects of any type. Redirects that occur are occurring from within your application's code or at your DNS provider.

Some DNS providers provide the ability to add redirect records - if you see the URL change from your custom domain to your herokuapp.com URL then you may have configured your DNS to forward as opposed to using a CNAME record.

One can check the redirection location by running a curl -Iv <custom-domain>.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support