Netlify DNS working for Apex but CNAME subdomain returns not found

Could there be a mis configuration with the Netlify DNS CNAME? The Netlify site is reachable with the normal Netlify url but not with the subdomain.

Working:
Apex domain https://solshade.iohttps://awesome-brown-7add1d.netlify.app/

Not working:
CNAME subdomain https://wear.solshades.io/https://kind-panini-a730bb.netlify.app/

Error message:

Not Found - Request ID: 01FSYK00NXPCR80WM87DY1XNR9

You can also run this to check
curl -svo /dev/null https://wear.solshades.io 2>&1 | grep ‘x-nf-request-id’

< x-nf-request-id: 01FSYJD6KBBJPK93FREQ5QW074

dig wear.solshades.io NS +noall +answer
;; global options: +cmd
wear.solshades.io. 1141 IN CNAME kind-panini-a730bb.netlify.app.

hey there mnaz,

our first question would be about where the content for the subdomain is coming from.

there needs to be a branch that has the exact name and spelling of the subdomain you are trying to deploy it to. our system matches the two up for you.

before we dig in further, can you confirm this is the case?

The CNAME points to another Netlify site repo we own and is not a branch from the main site repo. I was under the impression that you can add a CNAME and point it to a Netlify site. This is not a DNS entry automatically added when making a branch.

The goal was to have the sub domain served from another repo that can be separately managed and not part of the main repo. It seems using a branch would be better when working on reviewing updates to a repo.

How would you suggest serving up a subdomain from another Netlify repo?

hi @mnaz, thanks for explaining! what you are doing makes sense and should be possible - i suggested the most common default use case first.

quick question - when did you make these changes?

Hi @perry
The change was made over 24 hours ago and seems to have taken effect.

From the dig request is this valid and should work?

dig wear.solshades.io NS +noall +answer
;; global options: +cmd
wear.solshades.io. 1141 IN CNAME kind-panini-a730bb.netlify.app.

How do you suggest I debug this if the settings are proper.

It just seems odd because I can get to the site that I want as the sub domain but when I add it as a subdomain using CNAME, it gives me a not found.

thanks for look into this.

thanks for that info, @mnaz . I have broad knowledge generally speaking, but am not a DNS expert so I’m going to ask a colleague to weigh in who can assist. We’ll get you up and running, in the mean time, if anything changes do let us know.

1 Like

Hey @mnaz,

You’ve not added the custom domain in the site settings:

Could you add the domain there and retry?

hi @hrishikesh,

So I need to add wear.solshades.io to the kind-panini-a730bb site, is the image correct? I do not want to cause any issues with the site solshade.io that is already in place.

yes, please try that!

So far looks good and I removed the CNAME I added because a NETLIFY was automatically added for it.
I waited and it propagated right away and worked!!
Thanks for the help, I was a little nervous making some of these changes and your help was awesome.

This might be something to add to your docs, it seems like a reasonable setup but has a number of steps :slight_smile:

1 Like

hooray! glad its working! and point taken about the docs addition, i’ll see what i can do!

1 Like

Hi @perry - I’m trying to do something similar but I want to just make sure I have it correct and not wipe out all the DNS settings on the primary account.

Netlify Account 1:
I have the DNS settings set up here - example.com. We have ~20 DNS records so it would be really bad to lose it or mess it up.

Netlify Account 2: (where my Netlify site is hosted)
I want to set up test.example.com to point to this Netlify site.

When I am in account 2 and go add the new custom domain for test.example.com – I get the warning above shown in mnaz’s screenshot. I just want to confirm - since our domain is already set up on Netlify in Account 1 - aside from adding a new Netlify record - it will not mess up any of the other settings, ie. it will not move any of the domain registration to account 2. Is that correct?

Thank you!!
Sharon

Hi @girlbot,

While the DNS configuration won’t move, you still won’t be able to connect the domain. We do not allow an apex domain or a DNS zone to exist in one account and a subdomain to be added in another account. Both need to exist in the same account.

Hey hrishikesh - ah ok. Thanks for letting me know before I did it and was super confused why it didn’t work :slight_smile:

Hi @hrishikesh - ok we are scratching our heads and can’t find any way around this. I was wondering if you could help us out.

So we tried using the redirect file on the main site (that’s in account 1) and do a 200 redirect to site 2 (on account 2) - it works when we redirect within the same site but not when we point it to the site on account 2.

Ideally - we can just set up a subdomain on the domain from account 1 to point to the Netlify site on account 2. We are the same company, but working in different division so we had different Netlify sites set up. Is there anyway you can help us on the backend with allowing this to work, or connecting our accounts somehow?

Any help would be appreciated. Thank you!

Hey @girlbot,

We can allow sharing the domains across teams, but this is a security risk and most likely would not want to leave the setting open. If you wish to absolutely enable it, you can let us know (here or in the helpdesk) and we can do it for you.

Hi @hrishikesh - we were able to get a work around. I am testing it out now to see if it works out.
If you were to enable it - would the setting be open just for our 2 accounts, or for anyone?

thanks!

:wave: @girlbot , the feature flag to allow domain sharing would only be enabled on your 2 accounts. Let us know how it goes! :slight_smile:

@audrey - ah ok got it. I ended up breaking off my app and having a mini app in the 1st account. It seems to be working out for now but good to know for the future around the domain sharing feature flag. Thank you for your response! :slight_smile:

1 Like