DNS issue with www. and non www on sub domain

we created a second shopify site to be put onto a subdomain which would be www.us.websitename.com

but both domains are not working and have errors:

www.us.websitename.com

us.websitename.com

from the beginning:
• added www.us.websitename.com domain and followed shopifys instructions to add the CNAME and ARecord for the www. version

CNAME - www.us

ARecord - us

all working.

next, we added the non www domain (us.websitename.com this will be set to redirect to www.us.websitename.com)

we encountered an error saying the CNAME is not set correctly for the non www domain

i spoke to a shopify expert, who advised us to:

Remove the ARecord - US

Amend the CNAME - www.us to

CNAME - US

so now we have the following records:

Main domain: (working fine)

ARecord - [email removed]

CNAME - www

Sub Domin:

CNAME - us

Errors:

www.us.websitename.com (domain is not connected error)

us.websitename.com (has no CNAME required adding)

questions,

do we need the a-record adding?

is the error because the us.websitename.com is forwarding to www.us.websitename.com

For your 2nd Shopify store:

‘www’ is a subdomain in itself … so you wouldn’t do “www.us.websitename.com” as that would essentially be a double subdomain (I just made that term up). Instead, you’d just do “us.websitename.com”.

To set that up, you would just need to add the CNAME record to your DNS records. You’d set up a CNAME record for subdomain “us” with the value “shops.myshopify.com” … and then you’d add the domain “us.websitename.com” to your domains section on Shopify.

For your 1st Shopify store:

You’d have 2 records for the main/original store.

You’d set up a CNAME record for subdomain “www” with the value of “shops.myshopify.com”, and then you’d set up an A-Record for “@” with the value of “23.227.38.65” … and then you’d add the domain “websitename.com” to your domains section on Shopify and it would add both versions of the domain (“www.websitename.com” + “websitename.com”).

TLDR:

You’ll have 3 DNS records in total:

A-record “@” = 23.227.38.65

CNAME “www” = shops.myshopify.com

CNAME “us” = shops.myshopify.com

www.websitename.com” + “websitename.com” = goes to the original (1st) website/store

us.websitename.com” = goes to the new (2nd) website/store

thank you, so to confirm for the subdomain, if we amend it to your recommendation, www.us.websitename.com would still forward to us.websitename.com

EDITED: wrong info provided

Sorry, ignore my last post … I think I’m mistaken (just tested on my own store, and it looks like it does actually allow you to have a subdomain with an extra dot/period).

Try adding a 4th DNS record - a CNAME record for “www.us” with value “shops.myshopify.com”.

So you would have 4 records in total:

A-record [email removed] = 23.227.38.65

CNAME “www” = shops.myshopify.com

CNAME “us” = shops.myshopify.com

CNAME “www.us” = shops.myshopify.com

On the first/original store, you’d add these 2 domains:

On the new/second store, you’d add these 2 domains:

"www.websitename.com " + “websitename.com” = goes to the original (1st) website/store

us.websitename.com” + “www.us.websitename.com” = goes to the new (2nd) website/store

Thank you, this is exactly how we have it set up, ( I amended after my original post) I did fear I may have too many CNAME records, but it has also passed the shopify test having all 4

appreciate your help

No problem! Happy to help :slightly_smiling_face: