Mobile app version of vmapp.org
Login or Join
Shakeerah822

: Can my single page application deliver an HTML snapshot to search engines? I’ve SPA (Single Page Application) project that works 100% using AngularJS, with all of it’s content dynamically generated

@Shakeerah822

Posted in: #Cloaking #CrawlableAjax #Html #Seo #SinglePageApplication

I’ve SPA (Single Page Application) project that works 100% using AngularJS, with all of it’s content dynamically generated through JavaScript on the client side! As you know this means no crawlability, and I don’t need to use headless browsers to generate HTML snapshots, I could generate it myself server side depending on the user-agent without code duplication.

I'm not trying to deceive search engines or deliver different data, but I'm trying to deliver a completely readable pages for SE with stripped down and simplified HTML layout.

My question is: if I’ve generated & delivered a different layout or HTML snapshot to search engines (but keeping the actual real data/content the same), is that considered cloaking or violates SEO in anyway?

I've read a lot of information in Google's Webmaster Help Center & other sources all over the internet without an actual accurate answer.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

You need to implement crawlable AJAX.


Include the meta tag <meta name="fragment" content="!">
Make the HTML snapshot available at example.com/?_escaped_fragment_=

DO NOT base your snapshot decision on the user agent. Googlebot wants to be able to see and render your page the way that users see and render it (for screen shots for example). Serving different content based on user agent is considered cloaking.

The meta tag and the parameter is the Google approved way of providing an HTML snapshot of your single page application.

10% popularity Vote Up Vote Down


 

@Deb1703797

I don't remember the references now, but Google doesn't mind. Actually, they do this themselves (kinda) in Angular docs. They render a different version of the HTML to Google (for example, doesn't have all the normal navigation).

Every single SEO article on the matter is about using the technique too (phantomJS crawls the site and sends the HTML result to search engine, sometimes crawling is in advance and cached to avoid latency penalty from Google).

There're even hosted/cloud services that do this for your app so you don't have to do most of the setup.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme