aspnetcore-angular-universal icon indicating copy to clipboard operation
aspnetcore-angular-universal copied to clipboard

Asp.net core 2 + Angular 4+ SPA SEO issues

Open marvelTracker opened this issue 6 years ago • 3 comments

Hi There,

I've used the ASP.net core 2 + Angular 4+ SPA template for one of my projects. It worked really well and I deployed it on Azure.

However, when I tried to index with google bot, it didn't correctly identify my content. I've attached the screen shot how the google bot renders the page and it didn't render the html in angular app

11 22

I really appreciate your help on this.

Thanks,

marvelTracker avatar Mar 22 '18 00:03 marvelTracker

When you right click and View Page Source, does it render the Angular app? Maybe there is an error in NodeServices when it renders the app.server.module.

Does it work locally?

chrisvfabio avatar Mar 22 '18 03:03 chrisvfabio

Yeah double check if it works locally, it sounds like there's an error during SSR so it's returning just the regular client-side application.

Or did you shut off server-side rendering? The _index.cshtml file should have aspnet tags in there where it's outputting the result of the serialized application.

MarkPieszak avatar Mar 22 '18 19:03 MarkPieszak

Make sure Azure is set to use Node 8.x+ as well.

MarkPieszak avatar Mar 24 '18 00:03 MarkPieszak