Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Adding to Custom Domain #37

Closed
NelsonScott opened this issue Sep 22, 2015 · 6 comments
Closed

Problem Adding to Custom Domain #37

NelsonScott opened this issue Sep 22, 2015 · 6 comments

Comments

@NelsonScott
Copy link
Contributor

First, just want to say this script to get up and running on heroku with Ghost works great, thanks for making it so easy.

The issue I'm having now is configuring my DNS to add my blog to a custom subdomain. It seems that adding a Custom Resource Record CNAME, supplying it with the heroku url, and then navigating to the subdomain results in the browser forwarding to the url of the app hosted on heroku. This behavior doesn't seem to happen for other apps hosted on heroku that I have successfully added to subdomains on my custom domain and seem to be integrated properly (I'm using Google Domains to manage DNS).

I was wondering if anyone was able to successfully add a custom sub-domain (NOT just subdomain forwarding) for your Ghost app hosted on heroku, or if this is a known issue.

@cobyism
Copy link
Owner

cobyism commented Sep 22, 2015

Other than following the regular instructions on the Heroku side of things, the other thing you might need to do is adjust the HEROKU_URL environment variable to be your custom domain instead of https://YOURAPPNAME.herokuapp.com, so that Ghost itself uses the correct root URL when creating links between all the pages. Could that be what’s causing the behaviour you’re seeing?

@NelsonScott
Copy link
Contributor Author

Went to the heroku dashboard and changed the Config Var HEROKU_URL to be that of my custom domain, no luck. Still forwards the user to the heroku url. Is there something else in the config to get ghost working on heroku that might be an issue?

@cobyism
Copy link
Owner

cobyism commented Sep 22, 2015

@NelsonScott Does changing the environment variable restart your application? If not, you may need to trigger your app to restart for Ghost to pick up the new HEROKU_URL value. If you’ve got the CNAME record pointing at Heroku as they require, the subdomain added to the app via the Heroku dashboard, and the HEROKU_URL environment variable configured, then that should be everything 😕

@NelsonScott
Copy link
Contributor Author

It works! It could be the change to the HEROKU_URL took a little while to work, or maybe it was just a DNS propagation issue. Either way thanks for helping me figure this out.

@cobyism
Copy link
Owner

cobyism commented Sep 23, 2015

No worries. Glad to hear something sorted it out! 😃

@DefCon-007
Copy link

I am still facing this issue. Using HEROKU_URL environment variable was of no help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants