Hi Akash,
As I understand, after you configured the app domain and tried to add the app in SharePoint store you encountered the error in SharePoint 2013 on premise.
The source of the problem is that your apps do not run on the same domain as the SharePoint server.
(ex: SP Server domain: vlad.com
App Domain: vladapps.com) and IIS is not able to connect the two.
You could check if the host header for your APP hosting SharePoint web application is blank in IIS manager. If not, you could create a web application and root site collection without a host header.
Here are the steps:
1. Go into Central Administration and click Application Management.
2. Go into Manage Web Applications.
3. Click on New, set the Port to 80 and do not enter anything in the Host Header, then create a Site Collection using the Team Site.
4. Delete the Default Web Site from IIS. Go into IIS Manager as an administrator, and expand your Sites.
Right click on the Default Website, and select Remove.
The article below is about troubleshooting setting up an environment for apps for SharePoint 2013.
http://absolute-sharepoint.com/2013/02/troubleshooting-setting-up-an-environment-for-apps-for-sharepoint-2013.html
The article below is about how to configure SharePoint 2013 On-Premises Deployments for Apps
http://blogs.technet.com/b/mspfe/archive/2013/01/31/configuring-sharepoint-on-premise-deployments-for-apps.aspx
There are similar cases:
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/3971d63a-c3f3-405b-a2e7-60845195262e/404-the-resource-cannot-be-found-when-click-into-the-sharepoint-app?forum=appsforsharepoint
https://social.technet.microsoft.com/Forums/office/en-US/fa1d2be9-09f0-41e0-b474-6a8deb8d7fb9/sharepoint-app-gives-404-error?forum=sharepointgeneral
Best regards,
Sara Fan