I couldn’t get into on of my heroku sites

Posted on Updated on

Strange news on heroku,  one of my heroku apps was not working even though nothing had changed.

This nameofmyapp-api.herokuapp.com page can’t be found

No webpage was found for the web address: https: //  nameofmyapp-api.herokuapp.com/

HTTP ERROR 404

The problem doesn’t appear to be an app issue, rather a DNS issue.

Last I had checked it, it was working fine. I had used it on and off for several days. After about a week, I came back to it and found it in this state. I even clicked the app from the “Open app” tab in heroku. I don’t want to rename the app to see if it would work, because I should not have to do that.

Steps taken

  1. Dynos restarted
  2. Heroku log checked.
  3. Run postman against the API

Then I realize that I am looking at the API version of the app, not the similarly named frontend.

The api doesn’t respond to requests at the top level route. That is by design. The front end is named https://nameofmyapp-app.herokuapp.com/ similar to https://nameofmyapp-api.herokuapp.com/.

Ways to prevent this in the future:

  • Add “API” to the beginning of the name rather then the end.
  • Add custom domain to the front end
  • READ CAREFULLY!

 

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s