Skip to content

Files

Latest commit

ea41219 · Feb 14, 2022

History

History
47 lines (29 loc) · 1.7 KB

custom-domain-default.md

File metadata and controls

47 lines (29 loc) · 1.7 KB
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

Manage the default domain in Azure Static Web Apps

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.

Set 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.

  1. With your static web app opened in the Azure portal, select Custom domains in the menu.

  2. Select the custom domain you want to configure as the default domain.

  3. Select Set default.

    :::image type="content" source="media/custom-domain/set-default.png" alt-text="Set a custom domain as the default":::

  4. After the operation completes, refresh the table to confirm your domain is marked as "default".

Unset a default domain

To stop domains redirecting to a default domain, follow the below steps.

  1. With your static web app opened in the Azure portal, select Custom domains in the menu.

  2. Select the custom domain you configured as the default.

  3. Select Unset default.

  4. After the operation completes, refresh the table to confirm that no domains are marked as "default".

Next steps

[!div class="nextstepaction"] Configure app settings