title: How to configure Azure CDN with front-end SPA and Azure WebApp with .Net Core WebApi to same custom domain?
body: <p>I would like to have <a href="https://example.com" rel="nofollow noreferrer">https://example.com</a> as the custom domain for the Azure CDN I have setup, and <a href="https://example.com/api" rel="nofollow noreferrer">https://example.com/api</a> as the rest api endpoint to catch all of the calls from my SPA to the back-end .Net Core Web API providing the data.</p>
  
  <p>How can I setup a custom domain on an App Service to serve the <a href="https://example.com/api" rel="nofollow noreferrer">https://example.com/api</a> and use the same custom domain for the Azure CDN to serve all of the front-end SPA web pages?  </p>
  
  <p>Right now, I have the custom domain configured for the App Service only, but I would like to move the front-end SPA to an Azure CDN to free up as many resources as possible for the Web API.</p>
  
  <p>Thank you in advance, any direction would be greatly appreciated.</p>