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!
Angular SEO Challenges – Content Invisible for Bots Due to this, Angular apps can fail in rendering the right content or their metadata. Most of the user's content can see on an Angular website or Angular app; the bots can't see it as they fetch data from the source. And Angular doesn't store data on the source.
To make your Angular app SEO-friendly, you can either implement Universal from the start or progressively add it to an existing regular application. When using it, you leverage the so-called Angular Universal Bundle and benefit from both client-side and server-side rendering in one app.
Simply put, Angular Universal enables us to build apps that have both the performance and user engagement advantages of single page apps combined with the SEO friendliness of static pages.
Angular Universal executes on the server, generating static application pages that later get bootstrapped on the client. This means that the application generally renders more quickly, giving users a chance to view the application layout before it becomes fully interactive.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With