Google not crawling links in AngularJS application


I have an AngularJS application that is injected into 3rd party sites. It injects dynamic content into a div on the 3rd party page. Google is successfully indexing this dynamic content but does not appear to be crawling links within the dynamic content. The links would look something like this in the dynamic content:

<a href=" Title&titleId=12345">Link Here</a>

I'm using query parameters for the links rather than an actual url structure like: Title/titleId/12345

I have to use the query parameters as I don't want the 3rd party site to have to change their web server configuration to redirect unfound URLs.

When the link is clicked I use the $locationService to update the url in the browser and then my angular application responds accordingly. Mainly it shows just the relevant content based on the query params, sets the page title and meta description.

Many of the articles I have read use the route provider in angularJS and templates but I'm not sure why this would make a difference to the crawler?

I have read that google should view urls with query parameters as separate pages so I don't believe that should be the issue:

The only things I have not tried are 1. providing a sitemap with the urls that have the query parameters and 2. adding static links from other pages to the dynamic links to help google discover those pages.

Any help, ideas or insights would be greatly appreciated.

Show source
| javascript   | angularjs   | seo   | googlebot   2016-10-13 00:10 2 Answers

Answers to Google not crawling links in AngularJS application ( 2 )

  1. 2016-10-19 23:10

    The web crawler might be running at a higher priority than the AngularJS interpretation of your dynamic links as the web crawler loads the page. Using ng-href makes the dynamic link interpretation happen at a higher priority. Hope it works!

  2. 2016-10-20 12:10

    If you use urls with # Nothing after the hash in the url gets sent to your server. Since Javascript frameworks originally used the hash as a routing mechanism, that's a main reason why Google created this protocol.

    Change your urls to #! instead of just using #.

    '$locationProvider', function($locationProvider) { $locationProvider.hashPrefix('!'); } ]);

Leave a reply to - Google not crawling links in AngularJS application

◀ Go back