Apple Sign In - Verification failed for domain

When attempting to create a Service ID to for Apple Sign In, I've been hosting the downloaded file at /.well-known/apple-developer-domain-association.txt but still get the message "Verification failed for domain"



None of the threads in this forum seem to have reached resolutions either. Does anyone know what to do?

I'd suggest inspecting the response from the request that's sent when you click on the "Verify" button. We had trouble too, but inspecting the response gave us a little more information (here's an example of a response we got - with some info edited out. In this particular case we had a 301 redirect that Apple wasn't keen to follow.) -

{

"responseId": "...",

"resultCode": ...,

"resultString": "Verification failed for domain",

"userString": "Error occurred while trying to access 'https://.../.well-known/apple-developer-domain-association.txt'. Received HTTP error code '301'.",

"creationTimestamp": "...",

"protocolVersion": "...",

"userLocale": "en_US",

"requestUrl": "https://developer.apple.com/services-account/.../account/ios/identifiers/verifyDomain",

"httpCode": 200

}


I tried doing this, but it didn't give me any other great info:

{
     "responseId":"...",
     "resultCode":13004,
     "resultString":"Verification failed for domain",
     "userString":"Verification failed for domain",
     "creationTimestamp":"2019-09-06T...",
     "protocolVersion":"QH65B2",
     "userLocale":"en_US",
     "requestUrl":"https://developer.apple.com/services-account/QH65B2/account/ios/identifiers/verifyDomain",
     "httpCode":200
}

Please let me know if you hear something - I'm having the same issue as you.

I'm having the same issue. Apple support won't help me. It's really infuriating...

Same here!!

Help please

Other than the responseId and timestamp, I get that exact response as well. No clue what's going wrong except that logs seem to show 301s happening on the server end. The file is exactly where it's supposed to be 😟 as far as I can tell.

So, as it turns out, our problem was that by default, all traffic to ourdomain.com was redirected to www.ourdomain.com. Since Apple doesn't like to follow redirects, it was failing the validation. Had to modify our configuration specifically for this file/situation so the file could be accessed directly at ourdomain.com/.well-known/apple-developer-domain-association.txt and the validation succeeded.

Same problem here. Has anyone resolved this issue?

I e-mailed support and got this answer:

"Your server must support the Transport Layer Security (TLS) 1.2 protocol and one of the cipher suites listed below:

TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA

TLS_DHE_RSA_WITH_AES_128_GCM_SHA256

TLS_DHE_RSA_WITH_AES_128_CBC_SHA256

TLS_RSA_WITH_AES_128_GCM_SHA256

TLS_RSA_WITH_AES_128_CBC_SHA256

Please make sure your server meets these requirements and then place the file in a path starting with “https://“"


What I did was get an SSL Certificate from LetsEncrypt, then on my Digital Ocean server, set up the SSL Cipher to only be set to "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" and it then verified. Hope this helps anyone with this problem, this information should really be documented.

Thanks for your response. I'm still waiting for Apple to get back to me, but I expect they will say the same thing.


Our site actually supports most of those cipher suites, so I'm currently at a bit of a dead end. I can even see the requests coming in from apple to that path, and we're returning a 200 OK with the verification file.


Will keep investigating...

I was having the same issue and it turned out to be Cloudflare.


Based on a comment I read about redirects, I looked into my Cloudflare settings.


I turned off "Always Use HTTPS" and was able to successfully verify my domain.


Hope that helps you or perhaps someone else.

This wasn't the issue for me as my domain is currently https://abc.domain.io with no redirect.


I'm using AWS/S3/CloudFront to host the file, so I'm trying some different CloudFront settings. I'll report back if I can get those to work.

I am having this issue also - any resolution from anyone? I created a support case but Apple Support said it was nothing to do with them?? Just crazy!


The file they provided is available, at the exact URL they require, but verification fails, with no feedback or any details as to why.


Our company domain uses HTTPS, provided by LetsEncrypt / CertBot on Ubuntu 18, all working perfectly, all insecure cyphers removed and unavailable, so I don't think it is an https issue as with others.


Has anyone found any solution?

In general what it worked for us is to expose the file directry from the domain (e.g mydomain.com ). Apple trys to find the file by in the following directory https://mydomain.com/.well-known/apple-developer-domain-association.txtIf your web app redirect the mydomain.com to www.mydomain.com, the vrification will fail.


I guess apple does not like the redirect option.

Hello, do you have any updates regarding this verification? Are you able to verify now?

I was also getting this issue. Contacting Apple Developer Program support revealed the following:


1. A downloaded domain verification file is valid for only 7 days.
2. The latest file downloaded should be available for verification. If you download more than one file in a 7 day period, only the latest file should be placed in the given location.
3. The verification will fail if you place any file other than the latest domain verification file downloaded during this 7 day period.


Information I can't find documented anywhere.


In my case our file had expired. Generating a new file, uploading it to the domain and trying the verification again before it expired again worked.

Seems odd, maybe they meant you need to grab and use it within 7 days of being requested/downloaded...


According to the docs:


Renew Your Domain Verification

Domain verification expires on the same date that your domain’s SSL certificate expires. Apple servers check if SSL certificates have been renewed at 30, 15, and 7 days before expiration.

I had to create a folder .well-known and place the file in that folder specifically, after that all worked fine.

I'm running node js and express and had the issue because I bought a cheap SSL cert from Sectigo.

Here's what I did to fix it.


1. Check your SSL certificate for errors https://www.digicert.com/help/


2. I had to install an intermediate certificate. That solved the issue.

If you perform the check in Safari, it won't give you a confirmation that the domain is verified.

Instead, perform the check in Chrome and it will give you a confirmation.


3. Inspect the HTTP header coming back from your server. If it's a 301 Apple won't follow it. Instead, the verification file must be returned via 200 HTTP status code. The verification file I'm referring to is https://example.com/.well-known/apple-developer-domain-association.txt where example.com is your domain.

Indeed it was redirected to "www.mydomain.com" so I had to reconfigure the domain to www.mydomain.com, download and paste the new apple-developer-domain-association.txt file in the project folder and it worked.

I tried doing this but it still doesn't identify the file. I'm running my site on wordpress, would that affect anything? Or the file permissions?

As far as I know they require second level domain. Third level domain won't work.

I'm really curious about this one! Do you have the link of the doc/thread where this is mentioned?

Would be really helpful, thanks 🙂

The documentation says:


To verify ownership of your domain, select Download to get the verification file, upload it at the URL listed below, and click Verify.


../example.com/.well-known/apple-developer-domain-association.txt


(I used here ../ to avoid the message from being moderate)


How do you create a folder called .well-known?


I got this error:


You can’t use a name that begins with a dot because these names are reserved for the system.


Please choose another name.

I finally managed to verify my domain by temporally disabling the Cloudflare Proxy for the DNS entry. Used also the blank domain (example.com instead of www.example.com and had to temporally disable non-www to www redirects).


After that I got a just the loading animation and any error message. After reloading the Verification Page showed the green verification badge.