GraphQL Request always return 301 code

Topic summary

Issue: Some Shopify GraphQL API requests return HTTP 301 (permanent redirect) consistently for certain stores, even on the first call.

Suggested checks: Verify the target store is active (not closed) and that the app still has access/permissions. If uncertainty remains, contact Shopify Support for account-specific diagnostics.

Workaround/insight: Using the store’s original myshopify.com domain (e.g., e912e6-f2.myshopify.com) avoids the redirect; this domain can be found under Settings > Domains. This suggests the 301 is a redirect to the store’s primary/custom domain, and some clients may not automatically follow redirects because “Follow Location” appears to be false by default.

Open items: How to enable follow-redirect (“Follow Location”) via the API is unclear; no method was provided. The thread does not establish a definitive root cause for why only some stores redirect, but the myshopify.com URL workaround is the current practical solution. Discussion remains unresolved.

Summarized with AI on December 28. AI used: gpt-5.

When I make requests to Shopify’s GraphQL API, some stores consistently return a 301 response code, even on the first request. Why does this happen for some stores but not others?

X-Request-ID:“73c19117-ca58-41e8-806b-6f4fe9a67801”

Hi!

It can certainly be puzzling when you’re getting inconsistent responses from the API. With the limited information we have here, it’s tricky to pinpoint the exact issue. However, it’s worth double-checking that the store you are trying to connect to is active (not closed) and that you still have permission to access it (not uninstalled).

If you’re unable to share more details in this forum and the problem persists, reaching out to Shopify support directly would be your best course of action. They’ll be able to offer more personalized assistance with your account details at hand.

Here’s to hoping it’s a quick fix!

I had the same problem.

I solved it by using the original url like “e912e6-f2.myshopify.com” so that there is no redirect neccessary.

You can find your original domain in Shopify Admin in Settings/Domains.

The problem with the Shopify API is that the Follow Location settings is set to false by default.

I can’t figure out, how to set this to true using the API.