App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I'm using the Translate & Adapt app to localize and translate my store as I am serving a multilingual community.
However, my sitemap is inaccessible because whenever I try to access /sitemap.xml, I'm getting redirected to /en-ca/sitemap.xml, as illustrated by the below script output. And then I get a 404 because, obviously, the sitemap is not being served at /en-ca/sitemap.xml .
I'm wondering if:
1. The Translate & Adapt app has any settings that I'm not aware of where I can control the redirects?
2. There is a way to override this behavior using the Shopify URL Redirect settings? For now, AFAIK I cannot do that because I did try to create a redirect from /sitemap.xml -> sitemap.xml but as expected, this is not supported. I also don't think I can create a redirect from /en-ca/sitemap.xml -> /sitemap.xml because this will cause an endless redirection loop.
3. Not ideal but alternatively, is there a Shopify setting that would allow me to serve the sitemap at /en-ca/sitemap.xml?
Those are the solutions that I can think of but I canoot figure out how to implement them.
The only other solution I can think of is using a proxy like CloudFlare or roll one out myself on a VPS but that just seems ridiculous.
For reference, here's a curl output that illustrates the behavior
curl -ILs https://${myDomain}/sitemap.xml | grep -i '^HTTP\|^Location'
HTTP/2 301
location: https://www.${myDomain}/sitemap.xml
HTTP/2 302
location: https://www.${myDomain}/en-ca/sitemap.xml
HTTP/2 404
Thank you for any help!
Hi! Thanks for your reply.
The problem with adding a URL redirect from /en-ca/sitemap.xml to /sitemap.xml is that it's going to cause an infinite redirect loop so this solution does not work.
I did not manage to get my sitemap via the CDN, I did replace my store ID in the URL but I only get 404s.
I will attempt to contact the Translate & Adapt support then.
It turns out that the problem is actually not caused by the Translate & Adapt app but it's really a consequence of Shopify's handling of domains that have multiple languages assigned to them.