2nd subdomain, pointing to a subdomain with DNS?

hello all! we moved from wordpress to craft a few months back and also pointed the domain to the netlify nameservers (still registered on hover.com. one issue we have is legacy DNS on two subdomains

netlify domain:
nervous-albattani-27695e.netlify.app

We have a domain, example.com - which deploys no problem

The two subdomains with the issue are/were connected to external webstore via a subdomain.example.com.cdn.cloudflare.net CNAME reference in the DNS.

I’m trying to take these two sub-domain URLs (store and store-us) and point them to our store on Bandcamp. Bandcamp only allows one subdomain to connect, i’ve done that for store.example.com, it connected quickly and all is fine (except that any links in the legacy setup - e.g store.example.com/product/ are lost when it redirects to bandcamp - bandcamp can’t do anything about that)

the second subdomain - store-us.example.com - i don’t know what to do with this. I’d like to redirect it to the newly updated store.example.com but i dont know the way to do that in the DNS, cname, alias?

would it be better to have both subdomains point to an intermediate server and have the redirect there to bandcamp?

should i setup some redirect rule in the sites code? (we have an external developer for this, who isnt available a lot - and i dont have access to the source code of the site)

thanks in advance!

Hey @rrrnnn,
To summarize to make sure I understand: you have

store.example.com does the right thing right now.
store-us.example.com does not.

store.example.com points to your Bandcamp store.
You are asking if you can point store-us.example.com to store.example.com, since Bandcamp can’t correctly process another subdomain pointing at it.

Is that correct? One thing I’m concerned about is that, in checking out your account, the store.example.com site does not seem to be working. Is that what you’re seeing on your end? If so, could you please send Bandcamp’s advice for configuring DNS so we can best advise?

1 Like

hey @jen!

yeah thats mostly it - the store subdomain connects to bandcamp most of the time, when it doesnt i get this type of error message displayed in the browser: “Not found - Request ID: d7f03ca5-f8d6-4637-85a6-6afd57807042-56604731” (the ID changes upon each browser refresh)

same goes for the store-us subdomain too, it connects sometimes to its legacy destination - sometimes it works on safari, sometimes not, sometimes works on chrome, sometimes not… so strange!

i had an email back from a colleague of yours earlier today - my initial email was mostly what i wrote above. in the email i also mentioned i had created some aliases in the DNS panel, which i deleted but they were still visible in the DNS backend. he asked me to confirm what they were (which i did via a reply) and he said he would delete.

thanks for any advice you might have, this is a little outside my knowledge level :slight_smile:

Alright I think I got this cleaned up :broom::broom:

You had several NETLIFY and NETLIFYv6 records where you really wanted CNAME records. It makes sense that those NETLIFY records were lingering from earlier times in your site’s history, since they are system records that cannot be deleted by you- you have to write to us in support to take care of it for you. Those records are basically A records “under the hood” so they were conflicting with the CNAME records you created.

Your store.example.com site now correctly routes to Bandcamp :partying_face:

To your question about pointing store-us.example.com to store.example.com: that may work sometimes but it is considered bad practice and probably results in not great performance. If the subdomain is critical for you, though, maybe it’s worth it. That’s a bummer limitation of Bandcamp and I don’t have great options for you.

One last possibly overkill option: you could create a new Netlify site, set its custom domain as store-us.example.com, and have only these two files in it:

  • index.html (can be trivial, only needed so that we successfully deploy your site)
  • a _redirects file with this rule: /* dom.bandcamp.com 200!

Let us know how it goes or if you run into any other issues :slight_smile:

1 Like

after the Christmas break, I was able to get back to this. I couldn’t get the _redirects file to work, but I did get it all working using a netlify.toml file, so we’re all good! thanks for the help!

1 Like