Blazor App not direct routing

Muneeb Akhter 0 Reputation points
2025-08-03T21:23:46.6133333+00:00

I updated my routes and staticwebapp.config.json to allow routes to get handled by blazor:

"routes": [
    {
      "route": "/api/*",
      "allowedRoles": ["anonymous"]
    },
    {
      "route": "/*",
      "serve": "/index.html",
      "statusCode": 200
    }
  ],
  "navigationFallback": {
    "rewrite": "/index.html"
  },

What is happening. I can click on the nav link that browses me to https://mywebsite.com/login but when i type https://mywebsite.com/login into my browser i get a 404 error

This is causing a lot of issues when routing out and back to the site for verifying emails and making purchases. please help.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.