Configuring an A record for Shopify with specific URL redirects

I’m currently working on setting up an A record for my domain to connect with Shopify. However, I have some challenges regarding redirects for certain URLs that Shopify’s native redirect feature does not support.

While Shopify allows URL redirection, it does not work for key paths like ‘/cart’ or ‘/checkout’. This is problematic for me because I have some old URLs that contain those paths, and I need to redirect them to maintain my SEO ranking.

I’m curious if there is a DNS method that lets me set the A record to point to Shopify while still redirecting these specific URLs. The difficulty arises because after I create the A record pointing to Shopify, requests are sent straight to their servers, meaning I can’t implement server-side solutions, such as .htaccess files.

Has anyone experienced a similar situation? I’m looking for DNS-based methods to achieve this without depending on server-side redirects, as those would be ineffective once my domain resolves to Shopify.

DNS won’t work for this - it only resolves domain names to IP addresses, not specific paths. Once your A record points to Shopify, all requests go straight to their servers. You’ll need middleware like Cloudflare Workers or AWS Lambda@Edge sitting between your domain and Shopify. These can catch requests to ‘/cart’ and ‘/checkout’ before they hit Shopify’s servers and redirect them wherever you want. Another option is to use a different host that supports .htaccess redirects while employing Shopify’s domain forwarding feature, allowing you to maintain your redirects while fully operating your store on Shopify.

totally get it! dns only routes to domains, not specific urls like ‘/cart’ or ‘/checkout’. consider using a subdomain for those redirects, or maybe look into cloudflare for managing them better. this way, you might keep your seo intact!