It is possible to rename an application by using the heroku:rename
command. The application becomes accessible by the new name immediately, and the old name should not be used anymore to address it.
For example, to rename the application as foozball.herokuapp.com
, you can type the following command:
$ heroku apps:rename foozball Renaming gentle-mesa-5445 to foozball... done http://foozball.herokuapp.com/ | [email protected]:foozball.git Git remote heroku updated
This command succeeded because we typed inside the application folder. If you want to change the application name from outside the Git checkout or application folder, you can type the following command:
$ heroku apps:rename newname --app oldname http://newname.heroku.com/ | [email protected]:newname.git
Any Git remote that points to the old name needs to be changed or updated manually to reflect the application name change as follows:
$ git remote rm heroku $ heroku git:remote -a foozball