404 error when trying to add domain to icloud

I can confirm this is working now. iCloud now has you manually enter your DNS records in Cloudflare. You’ll need to remove the domain and re-add if it’s still trying to automatically create your records.

I figured out how to add it for anyone else having this issue.

When you’re redirected the URL goes to something like https://dash.cloudflare.com/domainconnect/v2/domainTemplates/providers/icloud.com/services/custom_email_domain/ followed by a bunch of query params. Using each of these params you can map them to which DNS entry you need to add. As previously mentioned it should be 2 MX records and 3 TXT records. See @lishan89uc 's post for some more info on what these should look like. The query params are all URL encoded so make sure to run them through https://www.urldecoder.org before entering them into your DNS.

Now this by itself is not enough since iCloud will not check the domain for you until you trigger a callback. You will find one query param called redirect_uri which points to https://p28-maildomainws.icloud.com/v1/domain/domainConnectReply or something similar. Go to this URL and add the code in the query param state and this should trigger the check (So just navigate to https://p28-maildomainws.icloud.com/v1/domain/domainConnectReply?state=<value from state query param> in your browser). After this the domain changes should be picked up by Apple. If you get any errors, just fix them and trigger the callback again.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.