Azure Web App – set custom domain sub directory

azuredomain-name-system

How to setup example.com/dir for a Azure Web App when example.com is used on a different hosting provider?

Please note this custom domain URL is sub-directory and not sub-domain.

Best Answer

If my understanding is right, you could use Virtual directory to do this.

Virtual applications and directories

To configure virtual applications and directories, specify each virtual directory and its corresponding physical path relative to the website root. Optionally, you can select the Application checkbox to mark a virtual directory as an application.

Please refer to this similar question.

Update:

Something similar. example.com is already used by entirely different web app, not even hosted on Azure (say hosted on rackspace). Now I want to use only sub-directory (example.com/dir) to one of the web apps on Azure.

No, it is not possible. A domain only can point to a web app. A web app could use multiple domains.