I'm sorry to hear that you're having trouble with adding a custom domain to your static web app. Unfortunately, the error message "An unknown error has occurred while adding your custom domain. Please try again later" is not very specific, and it's difficult to determine the root cause without more information.
Here are a few things you can try to resolve the issue:
- Check the custom domain name: Make sure the custom domain name is correct and that it's not already in use by another Azure resource.
- Verify the CNAME record: Verify that the CNAME record is set up correctly in your DNS provider's control panel.
- Wait for propagation: It can take up to 72 hours for DNS changes to propagate. Wait for a few hours and try again.
- Check the Azure portal: Check the Azure portal to see if there are any error messages or warnings related to your custom domain.
Please let me know if these suggestions do not resolve the issue. We can work with you further to see if we can locate the cause of the error. We look forward to your reply.