In SharePoint 2013, once you’ve created a dedicated Web Application to host My Sites and a Site Collection with the My Sites Host template, you open a browser and enter the address of the new Site Collection which in this case is http://mysitesdev2013.domain.internal only to see a 401 Unauthorised error.
I set my My Sites web application with a host header URL, so I did make a DNS entry similar to http://mysitesdev2013.domain.internal.
Log files will display the following warning which is a good indicator of what the problem is:
8059 Warning Alternate access mappings have not been configured. Users or services are accessing the site http://servername with the URL http://mysitesdev2013.domain.internal. This may cause incorrect links to be stored or returned to users. If this is expected, add the URL http://mysitesdev2013.domain.internal as an AAM response URL. For more information, see: http://go.microsoft.com/fwlink/?LinkId=114854″/>
I solved this by creating an Alternate Access Mapping (AAM) for the dedicated My Sites Web Application in the Custom Zone. See image below:Contact Me link in the top menu.