0
votes

We have a app set up with a wildcard domain *.mysite.com

We also have url rewrite rules to redirect www.*.mysite.com to *.mysite.com

As far as I can tell there is no way to map 2nd level subdomains to an azure app. You get a nasty blue "Web Site not found" page.

Is there any way to better handle 2nd level domains? Any way of mapping them to a default site?

Is there a way to customise the 404 "Web Site not found" page?

Thanks.

UPDATE: So it seems that azure doe not support 2nd level subdomains - bummer.

Is there a way to route 2nd level domains differently to 1st level subdomains? A work around would be to have *.example.com to got to IP one and *.*.example.com go to IP two. Is there a way to do this? We are using route 53 for DNS.

1

1 Answers

0
votes

Is there any way to better handle 2nd level domains? Any way of mapping them to a default site?

AFAIK, Azure does not support wildcard custom domains currently. Single wildcard domain (eg *.mysite.com) is well supported, however eg www.*.mysite.com is not supported currently. If you want this feature added, you can locate to here to vote on the issue.

Is there a way to customise the 404 "Web Site not found" page?

For how to customize the 404 error page, you can take a look at the following reference. Add or modify the web.config file and set the Custom Error Element to On.

<customErrors mode="On">  
   <error statusCode="404" redirect="~/Error/NotFound"/>  
</customErrors>  

For more details, you could refer to this article.