Question

I'm currently deploying some django app on Heroku. I bought a domain name on Gandi, and made a subdomain redirecting (temporary redirection) on my heroku server. Currently, the subdomain is redirecting to the machine, this is working.

mysubdomain.mydomain.com --> something.heroku.com

However, when I navigate throught my website, I still have on my address bar the heroku domain name in front of my page (something.heroku.com/detailpage/slugforexample) I would like to hide the heroku domain name by my subdomain name (to have something like subdomain.domain.com/detailpage/slugforexample)

I set the Gandi configuration (temporary redirection to heroku server) I set on heroku domains:add with my subdomain.

Where do I have to configure the redirection ? Is it in heroku, wsgi, django conf ?

Was it helpful?

Solution

You shouldn't use Web Forwarding to achieve what you want. You should add a CNAME entry on GANDI for mysubdomain on your mydomain.com domain with a value of something.heroku.com. You should then add a custom domain to your application via heroku domains:add mysubdomain.mydomain.com - it looks like you've already done this last bit.

This means you will be able to navigate to mysubdomain.mydomain.com and the address bar will rename as this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top