Let's say that you have a big / heavy single page application (SPA) that can be represented statically in 100,000+ pages.

Will it be acceptable to have a back-end that dynamically generates pages that are very similar in structure and content to the pages generated by the SPA but with no styling - i.e generating a craigslist-like version of the SPA just for the search engines.

Will it be considered cloaking or will it be okay? (Given that the routing will the same and the structure and the content of the pages will be 95%+ similar to the structure and the content of the SPA)

The reason for me thinking about this approach is that it will save both a lot of development time (in this particular scenario ... because otherwise styling inconsistencies have to be handled) and unimaginable (in this particular scenario) amount of computational resources (that otherwise would be needed to cache everything using headless chromium).

  • 2
    Why would you choose to use a single page framework for a site that needs SEO and actually has 100,000 pages? Google has been working to handle AJAX powered sites, but there are a ton of limitations that make SEO for them really challenging. May 19, 2020 at 10:46
  • How would you ensure that that the server rendered version stays up to date? As the site changes, who is in charge of making sure the rendered version gets updated? Who looks at the rendered version? How often? May 19, 2020 at 10:48
  • @StephenOstermiller By automation testing.
    – bteo
    May 19, 2020 at 11:05
  • Something that would render the live version and fetch the pre-rendered version and compare the text on them? May 19, 2020 at 11:08
  • 1
    @Stephen Ostermiller Exactly - fetching both and comparing them. I can agree about what you say that it's not a good idea to use a SPA given the circumstances. However, the idea is the optimize for SEO an existing SPA in order to minimize the time for development. Building a craigslist-like version of the app can happen quickly, while all other solutions will be much more expensive. This is why I am asking this exact question.
    – bteo
    May 19, 2020 at 11:11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.