Ad

SEO For Angular 2 (Non-Universal) Apps

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!

Ad

Answer

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.

Ad
source: stackoverflow.com
Ad