App proxy returns 404

AI-generated summary

A Shopify app proxy was configured, but requests to the store-facing proxy URL returned a 404 instead of reaching the app’s proxy endpoint. The main question was whether the storefront URL should forward to the configured external proxy URL.

Key troubleshooting points raised:

  • Removing the extra path segment (app_path) was suggested, but the 404 still occurred.
  • A missing route on the app server was identified as another likely cause. In this context, a route means a backend endpoint that can receive the proxied request from Shopify.
  • The app was built with Shopify App CLI using Node.js.

The most useful later update clarified the likely root cause in local development:

  • App proxy requests are made by Shopify’s backend, not directly by the browser.
  • Because of that, the proxy target must be publicly accessible.
  • A local-only development URL caused the 404, and switching to Ngrok resolved it.

Outcome: the issue appears resolved for at least one similar case, with public accessibility of the proxy URL being the key requirement.

I’ve gone through this tutorial:
https://help.shopify.com/en/api/guides/application-proxies

…and setup my app proxy as follows:

If I test the following URL https://jspizza.myshopify.com/apps/my-app-proxy/app_path/

…I receive a 404.

Should that redirect to this url?:
https://my-app-proxy.com/app_proxy/app_path

Hello Jurbs,

There can be two possibilty:-

  1. remove app_path and then check.

  2. Have you created route for this. if not then please create one and then check.

  1. still gives me a 404

  2. I’ve not created a route. I’m not sure how to create a route to the app proxy or how that piece works. The Shopify App Proxy documentation is lacking in that area.

Which language you are using to develop this. Laravel,codeignter or any other.

Shopify App CLI (Node JS version) https://github.com/Shopify/shopify-app-cli

Just in case it helps some people, as I was banging my head against the wall on this. I was using a local dev environment to test the Shopify App signup and App page processes, which work fine as the requests come from directly your browser.

The app-proxy, on the other hand, involves Shopify’s backend (not your browser) making an HTTP request to your Proxy URL to download the contents of your page.

In my case, the Proxy URL I was using was not publicly accessible, so once I switched to use Ngrok it worked fine.