How to know the branch preview deploy url?

We have this site setup in Netlify and working just fine: https://peaceful-wright-319729.netlify.app

Whenever there is a commit in GitHub to master, this gets auto deployed and published. Works great.

We have now set up so that any branch gets pushed to Netlify as well using this setting:
Branch deploys
Deploy all branches pushed to the repository

And that seems to work too. Except we have no idea (without logging in to Netlify) of knowing what that new url for this branch is. For example, when a new developer created a branch and pushed to it, Netlify deployed it just fine. And I can see in the Netlify UI that the URL to preview this new branch is: https://5f34dd128cdc6b000816dad6--peaceful-wright-319729.netlify.app

So, clearly, it added a prefix of some unique identifyer before the “normal” domain name.

My question here is: “how can we know this url without having to login to Netlify?” The docs seem to say that we should be seeing that in GitHub somewhere (the commit list?), but I don’t see it. We have not done a pull request yet, as… the preview is to be used to see the differences and test it before putting a pull request.

Thanks!
Travis

hey there. We’ve been a little short staffed this week, but we’ll get you an answer as soon as we can. thanks for your patience!

This section in our docs shows the different urls we generate for deploys: https://docs.netlify.com/site-deploys/overview/#branches-and-deploys

To add to the docs @marcus referenced, for branch deploys, you can access the latest deploy using the branch name if you don’t want to use the deploy id, so:
https://manish_firstbranch–peaceful-wright-319729.netlify.app/login/

should be the same as:
https://5f34dd128cdc6b000816dad6--peaceful-wright-319729.netlify.app (if this was the last deploy to manish_firstbranch)

Deploy previews are different from branch deploys- deploy previews are generated on merge requests or PRs, and you can configure Netlify to show the deploy preview URL in the PR itself on the GitHub side if you want:

Let us know if you have any other questions!

1 Like

Oooooo cool! I knew about the commit statuses but hadn’t seen the PR Comments. That’s nifty! Thanks @jen!

1 Like