Upload JSON file "apple-app-site-association"

Good morning all! I have a similar issue @Kapil_Kumar. Any solutions in the making?

Thanks.

Ben

Maybe we should ask @thesergie directly :slight_smile: Because it seems such an easy addition.

There’s no way we can have a feature we can upload or configure apple-app-site-association and Webflow will put it under .well-known/?

Hi just want to follow up if any update?

Sadly no! I even went as far as to going on LinkedIn and finding a product owner that works for webflow to shed some light on this,… I guess it should be proposed on their feature list,… then get a lot of people to vote on it.

This is super silly that they dont support! Come on webflow, do something about this! There is some relation to this wishlist, as it is a static, and we want to choose how to load that static: Clean asset links: Host assets on a site's Custom | Webflow Wishlist

2 Likes

+1 , this should be a standard feature.

2 Likes

Can someone word it better than I did in the suggestion list?
https://wishlist.webflow.com/ideas/WEBFLOW-I-4239

@hassieb, @vongohren, @Ava ?

@Naos probably call it a way to just upload json files under well known. But I do think there is a wish thing for that if you dig a bit more

We are launching LAAS.me with a product and app and we really need this. Been working on the site for monts now and its finally ready. NOW we can’s use Webflow - any suggestions?

@Thomas_Andersen The only one that I know about is to export your site and self host.

Well im using CMS and webshop solution - that I can’t export :frowning:

As I was checking out if WIX could do it I stumbled upon this article. (WIX recently reached out to see if I wanted to check out their new editor which is just like WebFlow apparently, haven’t checked it out yet.)

1 Like

That is a viable workaround. Good find.

I agree with @webdev exporting would be the best approach but if you are already invested in Webflow hosted features then the only other option I can think of is a proxy server. That option comes with its own set of trade offs.

We thought about having the main site on a subdomain like “shop.laas.me” with a forward. Anyone tried that solution?

Just to be sure,… the link to the article I posted works for Webflow too!
So you can host in Webflow and serve the AASA

@Naos I didn’t see that link previously, that is an interesting solution. So its the proxy server method with the only caveat being you need to manage DNS from Cloudflare for this solution.

1 Like

Same issue for other .well-known resources e.g. /.well-known/security.txt (see security.txt - Wikipedia). See Well-Known URIs for a complete list – not sure how many of these work with Webflow.

HTTP/1.1 404 Not Found
Accept-Ranges: bytes
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 93
Content-Type: text/html
Date: Wed, 10 Nov 2021 22:02:28 GMT
ETag: W/"6171f01a-58"
Server: openresty
Vary: Accept-Encoding
Via: 1.1 varnish, 1.1 varnish
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Cluster-Name: us-east-1-prod-edge-eks-15
X-Served-By: cache-dca12920-DCA, cache-wdc5530-WDC
X-Timer: S1636581749.738755,VS0,VE3
cache-control: private

<!DOCTYPE html>
<html>
  <body>
    <p>Invalid .well-known request</p>
  </body>
</html>

Hey guys, I am using Cloudflare to handle my DNS and I have managed to create a reverse-proxy using Cloudflare Workers. In my scenario, I needed to create https://mydomain/.well-known/apple-developer-merchantid-domain-association to start accepting Apple Pay in my app. As you know, Webflow doesn’t support the creation of .well-known folder or redirects.

P/S: I am not a techie and I got these steps to work by putting together resources I found about setting up a reverse proxy using Cloudflare Workers to serve the file under a specific route. I’m afraid I won’t be of much help (I’ll try!) if you have any technical questions or different setup/use cases than my steps below.

Here are my steps:

  1. Configure your DNS provider and Webflow to use Cloudflare to manage your DNS: Connecting a custom domain | Cloudflare | Webflow University

  2. Host your the file you want to serve under the .well-known folder where you can get a publicly accessible link. In my case, I’m a Xano user hence I uploaded my file there and copied the public url to for the file.

  3. Go to Cloudflare > Workers. Setup your workers subdomain - this is where your workers live and accessible. You will be able to connect custom routes to your worker later.

  4. Click on ‘Create a service’

  5. Give your service a name or use the default random name the system generates for you. For me, I name mine stripe-apple-pay.

  6. Select ‘HTTP Handler’ as your starter

  7. In the next screen, click on ‘Quick edit’

  8. In the Quick Edit screen, replace the boilerplate code with the following code (Remember to replace your destinationURL placeholder with your file’s public url):

addEventListener("fetch", (event) => {
  event.respondWith(
    handleRequest(event.request).catch(
      (err) => new Response(err.stack, { status: 500 })
    )
  );
});

const base = "<your site's base URL>"
const destinationURL = "<public link to the file's URL>";
const statusCode = 301;

async function handleRequest(request) {
  const requestUrl = new URL(request.url);
  const { pathname, search } = requestUrl;
  // if request is for the resource to be reverse proxied
  if (requestUrl == "<URL of the requested resource eg. https://mydomain.com/.well-known/apple-developer-merchantid-domain-association>") {
    return fetch(destinationURL);
  } else {   // if request for other than the reverse proxied resource, reconstruct URL and redirect to the intended destination
    const redirectUrl = base + pathname + search;
    return Response.redirect(redirectUrl, statusCode);
  }
}

addEventListener('fetch', async event => {
  event.respondWith(handleRequest(event.request));
});

  1. Save and Deploy

  2. Go back to the previous screen and go to Triggers > Add Custom Domain. This adds a custom domain for your worker. I already have a CNAME pointing www to Webflow so in this step, I used the domain name without ‘www’ so it’s just domain-name.tld. After you have added the domain, you will need to wait a while for Cloudflare to activate the certificate.

  3. Still under ‘Triggers’, go to ‘Routes’ section > ‘Add route’.

  4. The ‘Route’ is whatever the url that we need to access the worker from. In my case, it’s https://mydomain/.well-known/apple-developer-merchantid-domain-association.

  5. If your certificate for the custom domain is already active, you should be able to choose your custom domain under ‘Zone’.


  1. Wait a few minutes for the configuration to propagate. Now go back to Quick Edits and send a GET request to your route. If everything is configured properly, you should get a Status 200 response with the file’s raw resource below the headers in the response.

  1. In my case, I need to go back to Stripe to enter my domain name for them to test the url

  2. Stripe detected the file at the url they are expecting hence approved my domain for Apple Pay.

6 Likes