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.
- Dynos restarted
- Heroku log checked.
- 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!