Branch Deployment of (Staging) Subdomain Not Working

I am having trouble on pushing to my staging subdomain and I don’t understand what the problem would be. The primary domain of my site, winprecars.com, is obviously connected to my netlify domain of winprecars.netlify.app. Once my remote master branch is pushed, my netlify and primary domains will be updated.
I want to recreate this same exact setup for staging. Meaning, I want to have a remote staging branch that will push to staging–winprecars.netlify.app and staging.winprecars.com. Therefore, I made a staging branch, pushed it to GitHub, created a branch-based environment in the Continuous Deployment settings:

Configured a subdomain for that staging branch:

And finally created the subdomain for by staging branch, of which Netlify automatically configured the DNS (last one below):

The problem is, when I push to my staging branch, staging–winprecars.netlify.app will update accordingly, but staging.winprecars.com will not. My only guess to why this is happening is that in the DNS record, that netlify creates, it is pointing to my netlify production site URL (winprecars.netlify.app) instead of staging–winprecars.netlify.app (value attribute in picture below):

If this is not the case, I do not know how to fix this.

TLDR: I made a staging branch that should push to my netlify branch URL and my branch subdomain URL, but it only updates the netlify branch URL and not the subdomain URL, like my production branch does.

Is there something I am missing? Help for this would be greatly appreciated.

This is the issue. You do not need to add the subdomain, this is handle automatically by Netlify.

The staging branch is showing the same content as the main branch (ergo site) because of this

% curl https://staging.winprecars.com -s | sha1sum
a4ad7d78556874938d6c9aecbbb211caf864c2f1  -

Both have the same hash.

% curl https://winprecars.com  -s | sha1sum
a4ad7d78556874938d6c9aecbbb211caf864c2f1

Leave the NETLIFY record though, that is required.

2 Likes

This solution worked. Thank you very much for your help. My staging site now gets updated GitHub pushes.