Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.7 KB

File metadata and controls

47 lines (29 loc) · 1.7 KB
title Manage the default domain in Azure Static Web Apps
description Learn to set and unset a default domain in Azure Static Web Apps
services static-web-apps
author cjk7989
ms.service azure-static-web-apps
ms.topic how-to
ms.date 02/10/2022
ms.author jikunchen

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