Log into the ECP (https://yourmailserver/ecp) on Exchange 2013
Navigate to servers > virtual directories
From virtual directories select > Microsoft-Server-ActiveSync (Default Web Site)
On, Microsoft-Server-ActiveSync (Default Web Site) double click, a new window pops up similar to the below screen.
Under the external URL type the your public domain name or the name which your email server is accessed from outside. Now save it.
Try configuring the iOS clients and it should work fine without any errors. This worked for me.
Note: You will have to reconfig your devices once above setup is completed after removing any previous non working accounts.
Below are the often prompted errors on iOS devices.