App domain URL in SharePoint 2013 returns Resource Cannot Be Found

While using AutoSPInstaller for creating a SharePoint 2013 farm, I configured the DNS to use apps.multicorp.com. The server responds well to PING requests but when I publish a simple “Hello, World” app to the portal, I get the “Resource Cannot Be Found” error.

image

This simply has to do with IIS host bindings. The default web site is still active and my portal responds to “portal.multicorp.com”.

Quick fix:

Open IIS Manager and stop, or delete, the default web site.

image

Select the portal site, select “Bindings…” and click “Add…”.

image

Create an assignment to all IP addresses for port 80. The site will now work.

image

Production level fix:

If you are hosting this application in a real-world scenario, use a separate IP address for the site and bind the wildcard against that and also bind the DNS app CNAME to that IP address. This address should normally be load balanced as well.