Azure / Azure/static-web-apps

# Azure Static Web App Custom Domain Issue

Open
#1,651 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

## Problem Description

I'm encountering persistent deployment issues with my Azure Static Web App after adding multiple subdomains to my domain. When trying to deploy through GitHub Actions, I consistently get:

```
The content server has rejected the request with: BadRequest
Reason: No matching Static Web App was found or the api key was invalid.
```

## Environment Details

- **Main Domain**: xyz.ai (custom domain configured in Azure)
- **Subdomains Added**:
- api.xyz.ai
- apim.xyz.ai
- reset.xyz.ai
- **Azure Resource**: Static Web App (Standard tier)
- **DNS Provider**: GoDaddy
- **GitHub Actions**: Using Azure/static-web-apps-deploy@v1
- **Application**: Angular 19 application

## Steps Already Taken

1. Successfully added subdomains through DNS (CNAME records)
2. Validated domains in Azure through the required TXT and CNAME records
3. Regenerated the Azure Static Web App deployment token
4. Disconnected and attempted to reconnect GitHub integration
5. Created a new GitHub workflow with simplified configuration
6. Confirmed successful local builds (npm ci & ng build)

## Additional Context

- The issue started after adding multiple subdomains to my domain at GoDaddy
- GitHub Actions workflow builds successfully but fails at the deployment step
- Azure shows the domain as "Validated" in the Static Web App configuration
- Previously successful deployments before adding the subdomains
- After disconnecting GitHub integration, we're unable to see GitHub details in the Azure Portal UI
- We've encountered difficulties reconnecting GitHub integration through both the Azure Portal and Azure CLI commands
- Even after successful reconnection attempts, GitHub integration details don't appear in the UI

## Error Details from GitHub Actions

```
Try to validate location at: '/github/workspace'.
App Directory Location: '/' was found.
Try to validate location at: '/github/workspace/swa-db-connections'.
Looking for event info
The content server has rejected the request with: BadRequest
Reason: No matching Static Web App was found or the api key was invalid.
```

## Questions

1. Could the multiple subdomain validations be conflicting with the Static Web App domain validation?
2. Is there a limit to how many custom domains can point to a single Static Web App?
3. What's the proper way to configure multiple subdomains while maintaining Static Web App deployment functionality?
4. Are there specific DNS configurations required when using multiple Azure services with subdomains?
5. How can we properly reconnect GitHub integration after disconnection when UI elements are missing?
6. Is there a way to "reset" the Static Web App's GitHub integration state without creating a new Static Web App?
7.If you see the attached image it doesn't have any options to reconnect to git repo how do i enable those options in existing static webapp?

Any assistance or guidance would be greatly appreciated!

Image

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.