Branch deploy failing to use branchname for url

Hi, @thedamon, and welcome to the Netlify community site.

The length of the branch name is causing this issue. Long branch names cause a limit with the DNS specification to be reached.

There limit in question is the max length of a “label” as defined here:

Quoting:

labels 63 octets or less

An “octet” is a single character for all practical purposes in this case. A “label” is any string between or before a literal . character in a domain name.

Taking, this domain name as the example:

foo.bar.example.com.

There are four labels above:

  • foo of length 3
  • bar of length 3
  • example of length 7
  • com of length 3

No one label can be longer than 63 characters. This is part of the specification for domain names (and not a limit being created by Netlify).

I believe this site name for the deploy above is 17 characters long.

Our systems always add two “-” characters between the branch name and the site name. So, this total length is 19 characters which leaves a remaining 44 character maximum length for branch names.

The branch name for that branch is 54 characters so the defined label is invalid and cannot be used. If a branch name is longer than 44 characters, the branch subdomain for the branch cannot be used.

Note, that max branch name length is dependent on the length of the site subdomain. If the site name was only 5 characters long, the max branch length would be 56 (which is 63 - 5 - 2). With a five character site name, this branch subdomain would the work like other branch subdomains.

If there are other questions about this, please let us know.

2 Likes