title | description | services | author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|
Manage the default domain in Azure Static Web Apps |
Learn to set and unset a default domain in Azure Static Web Apps |
static-web-apps |
craigshoemaker |
static-web-apps |
conceptual |
02/10/2022 |
cshoe |
Your static web app can be accessed using its automatically generated domain and any custom domains that you've configured. Optionally, you can configure your app to redirect all traffic to a default domain.
When you designate a custom domain as your app's default domain, requests to other domains are automatically redirected to the default domain. Only one custom domain can be set as the default.
Follow the below steps to set a custom domain as default.
-
With your static web app opened in the Azure portal, select Custom domains in the menu.
-
Select the custom domain you want to configure as the default domain.
-
Select Set default.
:::image type="content" source="media/custom-domain/set-default.png" alt-text="Set a custom domain as the default":::
-
After the operation completes, refresh the table to confirm your domain is marked as "default".
To stop domains redirecting to a default domain, follow the below steps.
-
With your static web app opened in the Azure portal, select Custom domains in the menu.
-
Select the custom domain you configured as the default.
-
Select Unset default.
-
After the operation completes, refresh the table to confirm that no domains are marked as "default".
[!div class="nextstepaction"] Configure app settings