Hi @dgb@nc can you share the certificate errors you're getting?
Yes, it is possible to configure redirects for custom domains on Azure Static Web Apps to route traffic from one domain to a specific page on another domain.
Here is how you can set up a redirect from custom.somedomain.com to www.somedomain.com/custom:
- In your static web app configuration, under "Custom domains", add both www.somedomain.com and custom.somedomain.com.
- Under "Routes", add a new route with the following settings:
- Route: custom.somedomain.com/*
- Redirect:
www.somedomain.com/custom
- Status code: 301
This should configure a 301 permanent redirect that will send all traffic from custom.somedomain.com to www.somedomain.com/custom. The redirects are handled by the Static Web Apps service itself, so you don't need to rely on DNS redirects. This should avoid any certificate errors that you were seeing before.