title: Mapping Subdomains to Areas in ASP.Net Core 3
body: <h2>What I want to achieve</h2>
  <ul>
  <li>Mapping my normal domain e.g.<code> example.com</code> to no area if possible.</li>
  <li>Mapping my subdomain e.g. <code>blog.example.com</code> to a area named <code>blog</code>.</li>
  </ul>
  <h3>What I have found</h3>
  <p>There are actually quite a lot of posts regarding to this topic, especially mapping subdomains to areas.</p>
  <p>From SO:</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/40512403/area-and-subdomain-routing">area-and-subdomain-routing</a></li>
  <li><a href="https://stackoverflow.com/questions/42287716/asp-net-core-mapping-subdomains-to-areas">asp-net-core-mapping-subdomains-to-areas</a></li>
  </ul>
  <p>Others:</p>
  <ul>
  <li><a href="https://www.danylkoweb.com/Blog/using-subdomains-in-aspnet-mvc-DX" rel="nofollow noreferrer">danylkoweb.com</a></li>
  <li><a href="https://benjii.me/2015/02/subdomain-routing-in-asp-net-mvc/" rel="nofollow noreferrer">benjii.me</a></li>
  <li><a href="https://web.archive.org/web/20170514074637/http://www.mikeminded.net:80/tutorials/webdevelopment/3-mapping-subdomains-to-areas-in-asp-net-core-mvc" rel="nofollow noreferrer">web.archive.org</a></li>
  </ul>
  <p>And there are probably even more.</p>
  <h3>Problem</h3>
  <p>But there is one big problem, in ASP.Net Core 3 they changed a lot of things, one of them being the routing in general, see <a href="https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-core-3-0-preview-4/" rel="nofollow noreferrer">mircosoft's devblog</a>. Basically they changed it so everything should now be endpoints.</p>
  <p>All the classes e.g. <code>MvcRouteHandler</code> and interfaces e.g. <code>IRouter</code> are basically obsolete now, at least from my understanding. After a while googling around and diggin' in the GitHub repositories I couldn't find anything useful.</p>
  <h3>Additional information</h3>
  <ul>
  <li>I am using <code>SDK 3.0.100-preview6-012264</code>, but trying to upgrade to
  <code>SDK 3.0.100-preview7-012821</code> as soon as possible.</li>
  <li>I am using a reserve proxy (nginx) which passes the request to the ASP.Net Core Server.</li>
  </ul>