- Newest
- Most votes
- Most comments
To complete Apple Pay domain verification, the Apple Pay domain verification file must be hosted precisely at https:///.well-known/apple-developer-merchantid-domain-association. Apple requirements stipulate that the file be served over HTTPS without any redirects. In this scenario, the CloudFront distribution should be configured to deliver the file directly from the S3 bucket, rather than through the S3 static website hosting endpoint, which only supports HTTP and introduces redirects that prevent successful verification.
Hey,
Hope you're keeping well.
Apple Pay will only verify if the file is served exactly at https://<your-domain>/.well-known/apple-developer-merchantid-domain-association with no redirects and using HTTPS. If you’re using S3 static website hosting, that endpoint only supports HTTP and will cause the redirect issue you’re seeing. Configure CloudFront to fetch the file from the S3 bucket’s REST API endpoint (not the website endpoint), place the verification file in the bucket with public read, and create a CloudFront behavior for /.well-known/* that enforces HTTPS and points directly to that origin. This ensures the file is delivered over TLS with no protocol or path changes so Apple Pay can validate successfully.
Thanks and regards,
Taz
answered 9 months ago
Hey,
Hope you're keeping well.
Apple Pay’s domain verification must return the file over HTTPS with no redirects, which means you can’t use the S3 static website endpoint since it only supports HTTP. In CloudFront, set up a dedicated origin using the S3 bucket’s REST API endpoint (the one in the S3 console under “Bucket ARN” or https://bucket-name.s3.amazonaws.com). Upload the apple-developer-merchantid-domain-association file into the bucket with public-read ACL, then create a CloudFront behavior for /.well-known/* pointing to that REST API origin with “Redirect HTTP to HTTPS” enabled. This will serve the file directly over HTTPS without any protocol or host redirection, satisfying Apple’s verification.
Thanks and regards,
Taz
answered 9 months ago
