SEO for Angular 2 (Non-Universal) apps [closed]
Asked Answered
M

1

8

I have a deployed angular 2 app working nicely in Production. The issue is the web crawlers are not actually able to crawl and index the whole site, I only see the main index page/route being crawled. FYI, my application is not using universal angular. Is there anyway, I can make the site crawlable and indexable for the search engine bots without universal angular. If not how can I make use of universal angular in my existing regular angular 2 project.

Thanks!

Moreau answered 24/8, 2017 at 11:2 Comment(2)
I'm voting to close this question as off-topic because it is about SEO, not programming. SEO questions may be asked on Webmasters.SESyck
it is totally a programming question, you are so wrongHawaiian
P
6

Generally SPA's are not SEO friendly, that is why you are getting in to such trouble. There is nothing much you can do about it in case of angular SPA, without implementing universal.

If you are using angular cli you can find how to implement universal here https://github.com/angular/angular-cli/wiki/stories-universal-rendering

Some guides how to implement universal with nodejs or .net core can be found here https://github.com/angular/universal (see Getting Started section).

HOWEVER, if you really do not want to implement universal for some reasons, you can try to play with services like https://prerender.io/ and see if it can solve your problem without getting in to universal.

Prismatic answered 24/8, 2017 at 11:9 Comment(4)
thanks for your answer. I am also leaning towards the prerender.io solution, because I am not sure what and how much it would take to implement universal to my current regular angular 2 application. Not sure if I'll have to rewrite a few things if I were to implement universal angular.Moreau
You just have to take care of bublic pages in that case unless the majority of your app is actually public...Prismatic
@kuncevic you mean he needs to take care of protected page that you should be authenticated in order to have access to ?Follow
@SadokMtir what I am saying is that if you want to use universal just for a sake of SEO you should just implement universal thing only for pages search engine have access to, so in most of the case scenarios it is come up to be just a public pagesPrismatic

© 2022 - 2024 — McMap. All rights reserved.