Renaming Apps
Last updated June 14, 2023
Table of Contents
Every Heroku app has a unique app name to identify the app. You can rename the app at any time, which also updates the subdomain that your app is accessible at.
Rename an App in the Heroku Dashboard
To rename an app, click the name of the app from the dashboard, and then click the Settings
tab.
Rename an App with the CLI
You can rename an app at any time with the heroku apps:rename
command. For example, to rename an app named old-example-app
to new-example-app
, run the heroku apps:rename
command from your app’s Git repository.
$ heroku apps:rename new-example-app
Renaming old-example-app to new-example-app... done
http://new-example-app-1234567890ab.herokuapp.com/ | git@herokuapp.com:new-example-app.git
Git remote heroku updated
You can also rename an app from outside of its associated Git repository by including the --app
option in the command.
$ heroku apps:rename newname --app oldname
http://new-example-app-1234567890ab.herokuapp.com/ | git@herokuapp.com:new-example-app.git
When you rename an app, it’s immediately available at the new corresponding herokuapp.com
subdomain,new-example-app-1234567890ab.herokuapp.com
, and it’s unavailable at the old one, old-example-app-0123456789yz.herokuapp.com
.
If you have custom domains configured that use your app’s old subdomain, for example, a CNAME record that points to old-example-app-0123456789yz.herokuapp.com
, you must update the configuration for those domains.
Update Git Remotes After Renaming
If you use the Heroku CLI to rename an app from inside its associated Git repository, your local Heroku remote is updated automatically.
You must update the remote’s details on other instances of the repository manually.
You can run these commands to update the remote’s details in other repository instances.
$ git remote rm heroku
$ heroku git:remote -a new-example-app