Goal: architect Brickwork front pages SEO such that:
- Google is able to index and see content
- Other search bots can index and see content (+)
- Clients can install asiago on their site and enjoy benefits of SEO (++)
- sitemap.xml is already served from rails app.
- Need detect bots and serve JSON-LD and simplified/plain content for store/feature/event pages.
-
- hard to reuse for retailers hosting asiago pages
-
- duplication?
- Pro: no extra infra required.
- Con: No visibility why Google does or does not render page.
Possible improvements that may help:
- fast to render, which comes down to have API data readily available
- preload data in the pages that rails app serves
- API to respond to
...store-slug.js
urls that get linked through<script>
tag, and setwindow.store = {...}
, which reduce the time to render Asiago page
- handle special features potentially missing from the Googlebot browser (e.g. WebGL, GeoLocation)
Here we build infrastructure to specifically process search bot traffic and serve pre-rendered content. Pre-rendering of pages can be used just to handle bot traffic, or (in addition) to improve the first render of a page for users (requires more testing, may be phase 2).
One piece of the infrastructre is a prerender app, that takes any url as parameter of request, prerenders it, and returns HTML as response. It is a generic app that can be used for any pre-rendering need (not specific to brickwork business). It can also be used to help retail clients to pre-render pages. The decision here is how to host it, options are: hosted service on prerender.io, heroku app, aws beanstock, serverless.
Another piece of infrastructure is the handling of bot requests. It can be done in the rails app through middleware, or at CloudFront though Lambda@Edge.
My notes on working with prerender.io (https://gist.github.com/kmamykin/48c41ae19d571c2c99370334d7de56da)
- "404" or "Page not found" pages in Asiago, and how prerender will deal with it... more research needed.
- Look into mapbox api v1 images not having max-age and expire headers. Switch to latest api version?
- Go through this list https://webmasters.googleblog.com/2016/11/building-indexable-progressive-web-apps.html