Sharing One App Store Link Across Countries: Routing Visitors to the Right Storefront
App Store web links include a two-letter country code, so a link copied from one storefront can show an 'not available' message to users elsewhere. Creating a separate link for every country is impractical, so the article proposes detecting the visitor's country at click time while keeping the app's numeric ID constant. On Cloudflare Workers, the visitor's country comes from request.cf.country, with unknown and Tor values treated as no country. Apple's public iTunes lookup endpoint can confirm whether an app is sold in a given storefront, and its responses can be cached at the edge to limit request volume. Because iPhone and iPad open App Store links in an app restricted to the account's home country, the author recommends showing a simple landing page with the app's icon, name, and a store button rather than redirecting, and falling back to the visitor's own country when the lookup fails.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in