From 0a51f3beb5a19a971843ff015e6d7df443abd770 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Sun, 6 Oct 2024 18:05:45 -0400 Subject: [PATCH] Clarify best app base path (`` tag) location (#33802) --- aspnetcore/blazor/host-and-deploy/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aspnetcore/blazor/host-and-deploy/index.md b/aspnetcore/blazor/host-and-deploy/index.md index fc2a157928..0ebd0c7d0b 100644 --- a/aspnetcore/blazor/host-and-deploy/index.md +++ b/aspnetcore/blazor/host-and-deploy/index.md @@ -194,10 +194,12 @@ In a standalone Blazor WebAssembly app, only the `` tag is configured, per ### Configure the app base path -To provide configuration for the Blazor app's base path of `https://www.contoso.com/CoolApp/`, set the app base path, which is also called the relative root path. +To provide configuration for the Blazor app's base path of `https://www.contoso.com/CoolApp/`, set the [app base path (``)](https://developer.mozilla.org/docs/Web/HTML/Element/base), which is also called the relative root path. By configuring the app base path, a component that isn't in the root directory can construct URLs relative to the app's root path. Components at different levels of the directory structure can build links to other resources at locations throughout the app. The app base path is also used to intercept selected hyperlinks where the `href` target of the link is within the app base path URI space. The component handles the internal navigation. +Place the the `` tag in `` markup ([location of `` content](xref:blazor/project-structure#location-of-head-and-body-content)) before any elements with attribute values that are URLs, such as the `href` attributes of `` elements. + :::moniker range=">= aspnetcore-8.0" In many hosting scenarios, the relative URL path to the app is the root of the app. In these default cases, the app's relative URL base path is `/` configured as `` in [`` content](xref:blazor/project-structure#location-of-head-and-body-content).