There is a facility in Openshift to assign alias using the command line tool:
rhc alias add myapp www.somwhere.com
Having to point a domain www.somewhere.com's CNAME to myapp-mynamespace.rhcloud.com would be enough to make access to www.somewhere.com go to the Openshift app.
I want to know if there is a facility in Heroku for this?
Answer is yes, https://devcenter.heroku.com/articles/custom-domains
$ heroku domains:add www.example.com
Related
I'm trying to add a custom domain name to my heroku app and I'm seemingly using the correct command to do this, at least according to heroku docs.
heroku domains:add domain.com -a heroku-app
But I'm getting the following error.
Error: Require params: sni_endpoint.
Error ID: invalid params
I was unable to find this error on google in relation to my case. I'd appreciate any assistance with this. Thanks!
SOLVED: I solved the problem updating the heroku cli from 7.59.o to 7.59.2.
In your terminal run:
sudo npm update -g heroku
once updated, I run:
heroku domains:add www.YOURDOMAIN.com --app YOUR_HEROKU_APP_NAME
Example:
Domain www.myverygooddomain.com
My Heroku app name: my-great-app
Command: heroku domains:add www.myverygooddomain.com --app my-great-app
Their documentation and their error reporting is terrible.
Basically, as of Nov 1, 2021, you have to tack on the "--cert" parameter and provide the name of your cert (sni_endpoint).
So, first, manually look up your sni_endpoint(s) by running:
heroku domains --app your-app-name
This will provide of list of all of your current domains/subdomains and the sni_endpoint(s) for each of them.
Then, add your new subdomain with:
heroku domains:add yoursubdomain.yourdomain.com --app your-app-name --cert your_sni_endpoint_name
https://devcenter.heroku.com/changelog-items/1938
Beginning October 31, 2020, API requests to the Domain Create endpoint will accept an additional sni_endpoint parameter. This is a new attribute that can either be:
A reference to a valid SNI endpoint or,
null if the domain should not be associated with an SNI endpoint.
On November 1, 2021, the API will respond with 422 errors if no sni_endpoint parameter is provided.
According to the documentation, Heroku passes KAFKA_TRUSTED_CERT, KAFKA_CLIENT_CERT and KAFKA_CLIENT_CERT_KEY directly into my heroku applications. In consequence, only applications running on heroku can access Heroku Kafka? I would like to access it directly from my home workstation but i dont know how to get the ENVs
You can run either heroku config --app your_application_name to get all variables, or run heroku config:get KAFKA_TRUSTED_CERT --app your_application_name to just get one specific variable.
You can also login to Heroku dashboard and find all variables there in "Settings" section of your app.
I would like to add a domain whatever.com to a heroku app that I collaborate on named whatever. When I type $ heroku domains it gives ! App not found.
How can I set the app I want to use, and then have it use $ heroku domains:add whatever.com?
Make sure you're in a directory that is linked to a herkou app if you want to issue commands without specifying an app name. Alternatively, you can add the --app= parameter to your command to explicitly specify the app you want the heroku command to run on.
$ heroku domains:add whatever.com --app=whatever
I am trying to point a custom domain as a CNAME at my heroku app. My domain is heroku.mikelyons.org and I have it pointed at mikelyons.herokuapp.com.
$ host heroku.mikelyons.org
heroku.mikelyons.org is an alias for mikelyons.herokuapp.com.
mikelyons.herokuapp.com has address 54.243.121.176
$ host mikelyons.herokuapp.com
mikelyons.herokuapp.com has address 54.243.121.176
$ heroku domains
=== mikelyons Domain Names
heroku.mikelyons.org
mikelyons.herokuapp.com
www.heroku.mikelyons.org
I added these domains with domains:add. But when I go to heroku.mikelyons.org I get a: "Heroku | No such app" page. What am I missing?
That all looks ok, there have been API issues this morning with Heroku which could explain the problem. I'd put it down to that.
UPDATE: But it looks like it's working now ;)
Heroku's documentation on CLI says to do this (link):
If you have multiple heroku remotes or want to execute an app command outside of a local working copy, you can specify an explicit app name, domain, or git remote as follows:
$ heroku info --app myapp
$ heroku info --app www.example.com
$ heroku info --remote staging
However, I'm unable to get that second one to work. This is what I get:
$ heroku info --app foo
=== foo
[...]
$ heroku domains --app foo
Domain names for foo.herokuapp.com:
foo.example.com
$ heroku info --app foo.example.com
! Resource not found
At the very least, the documentation seems incorrect. But is it possible to reference an app by one of its custom domains another way?
Thanks!
Yep, I concur that - using the latest Heroku CLI all the methods work except using the domain name. Is there a particular reason why you want to use that way if the other ways work for you?