1

I have a Angular 1x SPA that uses the HATEOS standard to manage navigation. This is further complication by the links needing to be digested and processed to direct the user to the correct content based on their country and selected (or sniffed) language.

this means that there are a lot of these in the HTML (on div tags and such)

ng-click="goToPage(content.id)"

Which leads to logic which might look like this, or even more complicated:

    $rootScope.goToPage = function (here) {
        if (here.type && here.type.id == 'somecontenttype') { 
            //Launch.set(here.title, here.mainAction.href, $filter('link')(here.links, 'page'),'');
            $location.path(here.mainAction.href);
        } else if (($filter('link')(here.links, 'page')).length > 0) {
            $location.path($filter('link')(here.links, 'page'));
        }
    };

The question is, can Google or Bing follow a link in that example? With the links coming from HATEOS (API) and there being no real address to follow, I would think Google has challenges following these types of links and we would need to rely on a sitemap.

  • I would recommend using a sitemap either way. I'm not familiar with Hateos.. are those "links" JavaScript? – Kristian Svensson Sep 19 '17 at 21:32
  • Your question is a bit unclear, since you don't show exactly show how these "Hateos" API link's anchor tags are rendered (as html). IMO as long as they have the rel="nofollow" they shouldn't be "crawled" or followed, thus affect SEO – unknownprotocol Sep 20 '17 at 5:23
  • Actually OP, disregard my first comment... after doing a bit of digging on what hateos API is, and re-reading (and better understanding) your question... I think, in your case, at least Google might actually index your dynamic content. See answer below... – unknownprotocol Sep 20 '17 at 5:33
  • ps- you might wanna make you question more broad, i.e not so specific to Hateos APIs but SPAs and other dynamically generated navigation/content – unknownprotocol Sep 20 '17 at 5:35
1

This is a difficult question, as we don't know the exact science/algorithms behind major search engine crawlers, but...

Looks like the Googlebot can crawl the DOM and analyze dynamic content, according to this SearchEngineLand article. I would imagine since Google developed AngularJS they know the inner workings and patterns and can more or less crawl the dynamic content, even using different User Agents that might trigger your different locale-specific content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.