Google indexed titles and content for all pages though. How are they doing that? Are the delivering different content based on ip or useragent or something?
Google indexed titles and content for all pages though. How are they doing that? Are the delivering different content based on ip or useragent or something?
[0] http://googlewebmastercentral.blogspot.ca/2014/05/understand...
For lyft.com Google shows me "Lyft is your friend with a car" which is not on the page.
For lyft.com/stories Google shows "Discover extraordinary stories from the Lyft community" which is also not on the page.
Maybe it's from good old metatags. The have some, but somehow they apply a scripting engine (angular?) to them:
<meta property="og:title" content="{{meta.title || 'A ride whenever you need one' }}{{meta.signoff || ' - Lyft'}}">
The "Discover extraordinary stories" text is not in the metatags though.As I wrote in another comment, that hasn't stopped Google requested pages via _escaped_fragment_.
Compare the source of the original page with this one:
https://www.lyft.com/work?_escaped_fragment_=
Implementing this is thankfully not too tricky.
Whilst there are various SaaS providers that will take care of it for you, it's relatively simple to add a rule that checks for the parameter, loads up the requested page in PhantomJS, and returns the rendered HTML.
Add a bit of caching, and the job's done.
[1] https://support.google.com/webmasters/answer/174992?hl=en
https://www.lyft.com/work?_escaped_fragment_=
Interesting. How did they make google check for that url in the first place? Via a sitemap or something?By including the following meta tag:
<meta name="fragment" content="!">
Google provide their own guide for this:The other common practice is to use a "prerender" server which uses a tool like phantomjs to render the HTML of the page. When googlebot or any other robot hits your http server, you check the useragent, and if it matches known robots you forward the request to prerender instead of your app server.
[1]: http://googlewebmastercentral.blogspot.no/2014/05/understand...
[2]: http://www.yearofmoo.com/2012/11/angularjs-and-seo.html
For what it's worth, Google and Bing both still make _escaped_fragment_ requests to our AngularJS site.
I'm not sure if this means that Google prefer prerendered views over the standard website. For now, it seems sensible to implement.