Jan Milosh @janmilosh
Indexing pages for single-page apps
where pages are rendered
Pre-render your pages.
Have your server deliver
the pre-rendered pages to crawlers.
Change is coming:
Understanding Web Pages Better
Friday, May 23, 2014 at 9:00 AM
Google Webmaster Central Blog
Why we might still need this:
If SEO is critical for your app
To be indexed by more search engines
Using JS by crawlers is still new
Google didn't render test site.
There are many methods for
serving pre-rendered pages.
The point here is to show one way,
and that it's quick and easy.
For this presentation:
AngularJS app (with
Nginx server on Digital Ocean
to serve rendered pages to webcrawlers.
How it works:
In our routing, change the hashPrefix to
Search engines will substitute
in their request.
requests are served pre-rendered HTML.
How it works, cont:
Prerender.io uses Phantom.JS to render the pages.
Prerender.io takes care of serving the pages.
See detailed explanation.
For Nginx, settings are added to the nginx.conf file.
Five Step Setup
Turn off HTML5 mode
and set the hash prefix.
Be sure to change
Add this meta tag
to the head of all pages:
<meta name="fragment" content="!">
For pages that don't contain a
Get Prerender.io token.
Modify server config.
Digital Ocean - Nginx
Prerender.io will show your
Test your app:
Should see rendered html
in view source.
Google Webmaster Tools
Set up account and verify.
Fetch as Google
Trouble with Apache (using .htaccess)
Server/config related problem??
Had previous success on shared hosting with Apache.
Prerender.io (Todd Hooper) was very responsive.
Google guide for making ajax sites crawlable
AngularJS Developer Guide/Using $location