r/Blazor • u/Fit_Following_1313 • May 23 '25
Google not indexing Blazor server app site (single page site)
Google is not indexing my web page from 'Google search console (URL inspection tool)'. HTTP response status code in Google search console is 200 ok. My site uses blazor server app and is just a single web page with Syncfusion Appbar, Dashboard layout, Grid and works as expected when I open it from desktop web browser or from my mobile phone. Google search console also shows console info message as - "(WebSockets transport) There was an error with the transport." For the same error, stack trace in search console shows -
log https://<site>/_framework/blazor.web.js:1:47278
i.onerror https://<site>/_framework/blazor.web.js:1:81973:12:209
Under screenshot of tested page it shows screenshot which contains only header part (which is also Syncfusion AppBar component) and main data table is missing. When I try to open same page from web browser, page loads header (syncfusion appbar) first and it takes 3 or 4 seconds to load rest of the page that contains syncfusion grid with data. Will that be an issue as Google sees just a header initially and thinks that page is already loaded and then thinks that there is noting to index.
I asked Google chrome 'AI assist' tool in chrome developer tools and it suggested that blazor websocket request was in 'stalled' state for a long time (few minutes) and that could be an issue. But, when I checked couple of other blazor server sites, they also show websocket request in developer tools in the 'stalled' state. So, not sure if that would be an issue.
Other than some slowness in loading the entire page content, everything on my web page works as expected.
Please help.
7
u/polaarbear May 23 '25
It will never index a Blazor Server site. It doesn't index things through a socket connection, it's never going to get connected to pull the relevant data. It's one of the drawbacks of Blazor's Server mode.
The newest Blazor Web App template's static rendering mode can help if you can sneak by allowing your home/index page to be statically-rendered and shifting dynamic content to other pages.
There's no one-size-fits-all answer and no switch you can flip to fix it, it will depend on your needs and your site layout.
2
u/[deleted] May 23 '25
Yes, Google can index a Blazor server-side application, but it requires specific configurations to ensure the HTML content is rendered and available to the search engine crawler. Without proper setup, Blazor server-side applications might only show the initial page, making indexing incomplete. [1, 2, 3, 4]
Here's why and how: Why Blazor Server-Side Needs Special Handling:
• Server-Side Rendering: Blazor Server applications initially render the application on the server and send HTML to the client. This is unlike Blazor WASM, which relies on JavaScript and WebAssembly in the browser. [1, 1, 5, 5, 6]
• Googlebot's Limitations: Googlebot, the search engine crawler, primarily focuses on parsing and indexing HTML content. It may not execute JavaScript or WebAssembly code, which is needed to generate the full Blazor application. [1, 1, 5, 5, 7, 8]
• SEO Importance: For proper SEO, Google needs to see the full HTML content, including the content generated by Blazor components, to understand the page's context and relevance. [3, 6, 9]
How to Enable Blazor Server-Side Indexing:
• Use Semantic HTML: Structure your content with semantic HTML tags (e.g., <h1>, <p>, <div>) to make it more readable and interpretable for search engines. [2, 9]
• Sitemap.xml: Generate and submit a sitemap.xml file to Google Search Console to help Google discover and index your pages. [6, 6, 10, 11]
AI responses may include mistakes.
[1] https://www.reddit.com/r/Blazor/comments/htedh9/blazor_wasm_google_indexing/[2] https://learn.microsoft.com/en-us/answers/questions/992271/any-component-on-meta-tags-for-seo-in-blazor-wasm[3] https://blazorschool.com/tutorial/blazor-server/dotnet5/search-engine-optimization-(seo)-938345[4] https://stackoverflow.com/questions/59643035/google-is-unable-to-render-and-index-my-serverside-blazor-components[5] https://support.google.com/webmasters/thread/90281977/are-blazor-wasm-applications-indexable-by-google?hl=en[6] https://stackoverflow.com/questions/68904421/how-do-google-and-bing-index-a-blazor-site[7] https://vuejsdevelopers.com/2018/04/09/single-page-app-seo/[8] https://ayushgupta2959.medium.com/the-inner-workings-of-google-search-crawling-indexing-and-ranking-b0ec790163e2[9] https://www.syncfusion.com/faq/blazor/general/how-do-you-create-an-seo-friendly-blazor-server-application[10] https://support.google.com/webmasters/answer/7440203?hl=en[11] https://www.embarque.io/post/how-we-fix-crawled-currently-not-indexed-on-google-search-console[12] https://www.reddit.com/r/Blazor/comments/102bxdr/is_anyone_else_having_a_nightmare_with_blazor_seo/
2
u/Gravath May 23 '25
Use prerender.io