angular-seo icon indicating copy to clipboard operation
angular-seo copied to clipboard

Cannot get all my pages indexed

Open arnauddri opened this issue 10 years ago • 2 comments

Hi,

Thanks for making this tool. I am trying to use it to index my app but somehow I can only get the homepage indexed.

As I am not using hashbangs, I've added the following meta tag to my app's header:

<meta name="fragment" content="!" />

In my main controller, I trigger $scope.htmlReady when the content is fully loaded:

  $scope.$on('$viewContentLoaded', function() {
    $scope.htmlReady();
  });

I have loaded the seo module properly and while my server's app listens on port 4000 (I use an express server), I launch phantomJS on port 4040 with the following command:

phantomjs --disk-cache=no ./bin/angular-seo-server.js 4040 http://127.0.0.1:4000

If I check how things are working for the homepage with a simple curl 'http://127.0.0.1:4040/?escaped_fragment=' I get the correct HTML rendered properly.

But if I try a different route like http://127.0.0.1:4040/test?escaped_fragment= I only get html <html><head></head><body></body></html> while http://127.0.0.1:4000/test works fine.

How can I make sure all my pages are indexed and not only my homepage?

arnauddri avatar Dec 02 '14 10:12 arnauddri

I tried running

phantomjs --disk-cache=no ./bin/angular-seo-server.js 4040 http://127.0.0.1:4000/test 

It works to serve my /test page. However I have pages like http://www.mywebsite.com/product/:product_id

How can I index them all?

arnauddri avatar Dec 02 '14 12:12 arnauddri

@arnauddri did you ever figure this out?

I added $scope.htmlReady(); to each place my dynamic code injects the proper content into the scope on each of my dynamic pages I want spidered. similarly, when i curl the URL, all i Get back is the content of my index.html page, and not the HTML content that should be inside my ng-view.

cruvitaDev avatar Mar 16 '15 21:03 cruvitaDev