Make subdomain.netlifydomain.com redirect to https://subdomain.netlifydomain.com

Site name:
idyllic-panda-501413
With custom Domain handled by Netlify
www.pidamosgo.com

I added a subdomain:
app.pidamosgo.com

That subdomain points to a Heroku DNS target and the SSL certificate on Heroku side

I noticed that visiting app.pidamosgo.com shows “Not secure”, but visiting https://app.pidamosgo.com does show “Secure”

Is there a way I can redirect app.pidamosgo.com to https://app.pidamosgo.com ? Where should I set that?

Thank you

DNS propagation can take a while. Your subdomain looks secure now

Hi Tom. Thank you for your comment.

When I visit app.pidamosgo.com from different devices and browsers I keep seeing “Not secure”.

Is it possible you visited the wrong link?

Hi, @orozCoding. The domain app.pidamosgo.com is hosted at Heroku (as you mentioned above):

app.pidamosgo.com.	3600	IN	CNAME	comparative-coral-laflkvhh8xe6bl69emw0nok1.herokudns.com.
comparative-coral-laflkvhh8xe6bl69emw0nok1.herokudns.com. 6 IN A 54.161.241.46
comparative-coral-laflkvhh8xe6bl69emw0nok1.herokudns.com. 6 IN A 54.237.133.81
comparative-coral-laflkvhh8xe6bl69emw0nok1.herokudns.com. 6 IN A 52.202.168.65
comparative-coral-laflkvhh8xe6bl69emw0nok1.herokudns.com. 6 IN A 18.205.222.128

This means Heroku is providing the HTTP service for this domain. Redirection occurs in the HTTP protocol and not the DNS protocol. Netlify is only providing DNS service for that domain so we cannot provide the redirection at the HTTP level. The HTTP to HTTPS redirect must be configured at Heroku for this reason.

If there are other questions about this, please let us know.

Thank you Luke. Will try to reach out to them.

Leaving my solution in case it’s helpful to someone else:

In my Rails app, all I had to do was to set config.force_ssl = true.

1 Like