Azure Static Web Apps separates frontend hosting from backend execution. HTML, CSS, JavaScript, WebAssembly, and images are distributed globally, while API requests run on managed Azure Functions or a linked backend. Selecting a resource region determines the location of the managed Functions API, not a geographic boundary for static content. Applications with strict data-residency requirements should assess this distinction before selecting the service.
A typical deployment starts with a GitHub repository or Azure DevOps project. A workflow builds the application and deploys its generated assets, along with an optional managed API. Configure the application source directory, API directory, and build output directory explicitly, particularly for monorepos. Custom build steps can produce frontend artifacts before the deployment task runs. Protect deployment tokens as CI/CD secrets and never commit them to source control.
Application behavior is configured in staticwebapp.config.json. This file controls routes, authorization rules, response headers, redirects, response overrides, and navigation fallback. Ensure the build copies it into the root of the deployed output. For a single-page application, configure navigation fallback so that a direct request to a client-side route returns the application entry point. Exclude asset paths from fallback where missing files should return an actual error rather than HTML.
Built-in authentication supports Microsoft Entra ID and GitHub, and route rules can restrict access by role. Authentication and business authorization remain separate concerns: an authenticated user must still be checked for permission to access individual records or execute sensitive operations. Keep database credentials and other secrets in backend configuration, not frontend environment variables that are embedded in downloadable JavaScript.
For APIs, managed Functions provide a deployment model tied to the web application. Standard accounts can instead link supported Azure Functions, App Service, Container Apps, or API Management backends. The /api route gives browser code a same-origin endpoint without requiring custom browser CORS configuration for that path. Backend capacity, supported runtimes, access controls, and availability still require separate consideration.
Custom domains and automatically renewed TLS certificates support production hosting. Pull-request preview environments allow reviewers to test changes before merging, subject to workflow support and plan quotas. The Static Web Apps CLI approximates hosting, routing, and authentication locally, but its mock identity system does not replace testing with the real identity provider.
Static exports from frameworks such as Next.js fit the static hosting model. Hybrid Next.js hosting is a separate preview capability with restrictions, including unsupported linked APIs and SWA CLI emulation and deployment. The Dedicated preview pricing plan was retired on October 31, 2025. The database connections preview was deprecated effective November 30, 2025; applications using it should migrate to an application-owned API, such as Data API Builder hosted in Azure Container Apps.