Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google indexing of my AngularJS application

There was a blog post from google that they are indexing javascript applications. However, my AngularJS Application www.fore-cite.com seems not to be indexed at all. Is there anything special that I have to do in order to enable indexing and make the content searchable?

like image 247
paweloque Avatar asked Jan 08 '15 21:01

paweloque


People also ask

Can Google crawl Angular apps?

Another method to make angularjs SEO friendly can use Angular Universal Extension to create static versions of web pages that can be rendered on the server-side. Google's bots can easily reach and crawl them and provide indexes to your pages.

Is AngularJS good for SEO?

Key Takeaways. AngularJS offers incredible opportunities to improve user experience and cut the development time. Unfortunately, it also causes serious challenges for SEO. For one, SPAs contain no code elements required to have the content crawled and indexed for rankings.

Does Google still support AngularJS?

The countdown has started! You may already know it, but by the end of December 2021, Google will no longer support AngularJS. If your applications use this framework, it's time to consider a quick code migration for your projects to Angular.


1 Answers

The Google crawler does execute javascript on the pages that it crawls. With AngularJS, there are a few steps you have to take to make sure that your application is getting crawled and indexed properly.

HTML5 Mode

You must use html5 mode.

Webserver Setup

For the html5 mode to work properly, you must configure your webserver so that requests to directories that don't exist get rewritten to index.html.

Sitemap

Google does not properly follow links in angularjs apps yet, therefore you must create a sitemap for all of your routes. This sounds like a pain to do, however, with proper build processes this can be a very automated process. (gulp, grunt, etc.)

Cons

This of course only applies to the google crawler. Other search crawlers such as Bing may not support javascript applications yet, though I wouldn't be surprised if this changes over the next year or two (if it hasn't already.)

Other considerations

One commonly missed problem with indexing angular apps is things like pagination and content that shows up after clicking a button. If these actions do not change the url, google will not crawl it. For example, say you have a page with a table using pagination and it has 3 pages. Google will only crawl the first page unless each page has a different url route such as /table/page/1 /table/page/2 /table/page/3

like image 87
Kevin B Avatar answered Sep 18 '22 12:09

Kevin B