Heroku App Names and Subdomains
Last updated June 07, 2023
Table of Contents
Every Heroku app has a unique app name and subdomain. This article explains how they’re generated and the relationship between them.
App Names
The app name is a unique identifier for your application. It can be a string of lowercase letters, numbers, and dashes, up to 30 characters. You can choose the name on app creation in the dashboard or by running heroku apps:create APPNAME
.
For example, if you create an app with the name example-app
, you can access its info in the Heroku CLI with heroku apps:info --app example-app
.
If you create an app without choosing a name, the platform generates one for you.
The Heroku platform uses this name as the subdomain of the app’s URL, except for Review Apps which follow a different pattern.
You can rename apps at any time, which results in a new subdomain. See Renaming Apps from the CLI for more info.
Subdomains
By default, apps are accessible at their Heroku domains, which have the format of APPNAME.herokuapp.com
.
The exceptions to this format are if you configured Review Apps which has two options for URL formats.
Renaming an app destroys the old subdomain and creates a new one.
For info on adding custom domains, including adding a custom domain with a subdomain, see Custom Domain Names For Apps.
Starting June 14, 2023, Heroku will start appending identifiers to subdomains. Applications created before this date maintain the old subdomain scheme where the subdomain was the same as the app name.