My Netlify site name is habitat-caesium.netlify.app, and basically I am trying to get https://www.habitat.caesium.dev redirected to https://habitat.caesium.dev and https://www.staging.habitat.caesium.dev redirected to https://staging.habitat.caesium.dev.
As per initial support from Netlify, here my relevant settings for my Netlify domains:
While https://www.habitat.caesium.dev is redirected to https://habitat.caesium.dev properly, https://www.staging.habitat.caesium.dev is being redirected to https://habitat.caesium.dev instead of https://staging.habitat.caesium.dev.
Are you sure you’re seeing this? I tried your domain: https://www.staging.habitat.caesium.dev it doesn’t seem to be redirecting at all. I know this is not expected behaviour anyways, but wanted to make sure we’re on the same page before we debug further.
Yup! I think we can ignore the CORS error for the staging subdomain because my backend isn’t actually online right now, meaning for https://habitat.caesium.dev I would expect to the the spinning home page, and for https://staging.habitat.caesium.dev I would expect to see just the spinner.
And yup, I just wanted to configure the www subdomain just in case potential users might forget that its not part of the domain
Oh I see what’s happening here. staging.habitat.caesium.dev is actually a branch deploy and that’s where you’ve deployed the redirects. On the production deploy (that’s serving www.staging.habitat.caesium.dev), the redirects do not exist. You might want to add the redirects to the production branch too.