"Sign in with Apple" Verification failed for domain

When validating domain, getting error. apple association file was downloaded already and hosted.


File is downloaded and hosted at path: https://dev30.bookitall.com/.well-known/apple-developer-domain-association.txt

still on click of verify button, getting error : Verification failed for domain


getting reply like this in network:

  • creationTimestamp: "2019-12-02T09:03:25Z"
  • httpCode: 200
  • protocolVersion: "QH65B2"
  • requestUrl: "https://developer.apple.com/services-account/QH65B2/account/ios/identifiers/verifyDomain"
  • responseId: "d7bdc64f-dacb-49ce-a5bc-6bd11d57b22f"
  • resultCode: 13004
  • resultString: "Verification failed for domain"
  • userLocale: "en_US"
  • userString: "Verification failed for domain"

  • How could i know what was wrong? where? Is there domain issue or apple server issue?

    somebody can help me to fix out this?

    Replies

    i have the same problem 😟

    I have the same issue... The documentation for setting this up is really lacking...

    I resolved this, Verification failed domain is fixed, Apple needs many server settings proper on development environment as well.

    Our Technical architecture and DevOps team helped us and fixed it.


    Now facing other issues on website in latest Mac OS Catalina and IOS 13 device. we are not getting response from apple on registered redirect url.


    Please advice, Our app is in rejected state since last 20days.

    how did you resolve this? What settings needs to be done on the server? We are having the same issue.

    Ok, we have finally managed to verify our domain. Our issue was, that we had a general redirect rule on our server. This one had to be disabled for a short time for Apple to verify our domain.


    How we fixed it:

    1. Entered our domain "example.com" on Apple deveveloper portal

    2. Downloaded the "apple-developer-domain-association.txt" file

    3. Uploaded that .txt file to our server

    4. Disabled our "www." redirect rule "example.com" --> "www.example.com"

    5. Clicked on "Verify" domain button in Apple developer portal

    6. Apple website now shows a green checkmark --> woohoo domain verified ✅

    7. Now enabled our redirect rule again

    8. Done! Profit! 😁


    More Info:

    Apparently Apple will not follow the HTTP 301 redirect responses from your server. Your server needs to delivier the .txt directly under the url "https://example.com/.well-known/apple-developer-domain-association.txt" without any directs.


    How to check if redirect is the issue:


    1. Open termial and enter "$ curl https://example.com/.well-known/apple-developer-domain-association.txt"

    2. It will probably respond with something like the following:


    ```

    <html>

    <head><title>301 Moved Permanently</title></head>

    <body bgcolor="white">

    <center><h1>301 Moved Permanently</h1></center>

    <hr><center>nginx</center>

    </body>

    </html>

    ```


    3. Now try "$ curl https://www.example.com/.well-known/apple-developer-domain-association.txt" (with www.)

    4. If it responds with the content of the .txt file, then you have the redirect issue.

    --> to fix it: disable your "www." redirect url for a short time