Netlify CLI Alias URLs "Not Found"

Netlify CLI alias deploys not working

Hi, submitting builds from our own CI/CD system using the Netlify CLI (2.54.0). We have the autobuild functionality disabled in Netlify, and simply submit the builds after they have completed with the CLI.

We noticed the new release of the CLI supported --alias but this doesn’t seem to be working. The build submits, and the randomly generated URL works, but following the aliased name doesn’t work, despite the fact that the build entry in the Netlify UI links to this:

See here, with the "branch deploy’ hyperlink linking to the Alias URL. But this URL just shows 404 Not Found:
https://feature-netlify-staging--v2-admin-walkin.netlify.app/

What is interesting, is the URL on the “Preview deploy” hyperlink does work:
https://5ef7d9f560043f5327428089--v2-company-website.netlify.app/

Let me known if anyone else has experienced this. It seems like this should be working, since the UI links to it.

This is the command line we execute:
netlify deploy --dir packages/website/build --site $SITEID --alias $BRANCH_NAME--json > deployInfo.json

Hi, @strideynet, there is a forward slash in the $BRANCH_NAME. This results in an invalid subdomain of feature/netlify-staging--v2-company-website.netlify.app.

The CLI tool is correcting that string in the URL shown in the shell but it is sending the uncorrected string to the database. I filed an issue for with with the CLI tool repo (which is public) here:

The only workaround for now is to make certain that whatever is submitted only consists of valid characters for domain names (for example, “/” isn’t a valid domain name character).

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

Many, many thanks.

I thought I was going crazy :slight_smile: