Google crawler not finding dynamic pages

Code Solution

The example shown in the SEO Best Practice uses .then for awaiting the Promise.

If you use Async Await, then try below (which worked for me):

$w.onReady(async function () {
  try {
    await yourFunction1();
    await yourFunction2();
  } catch (error) {
    console.error("Async error:", error);
  }
});

Key Points:

  1. Add async after onReady
  2. Don’t need to add “return”

No Code Solution

In the SEO best practice, it mentioned that:

Note: Database content that is loaded into page elements using a dataset (instead of code) is included in the SSR version of your page and will be seen by search engines.

If the coding way doesn’t work for you, then connect the $w (ui element) using Dataset instead of code.

How to Check if it is Working

  1. Go onto Google Search Counsel and try Live URL test

  2. Right click the page to “View page source”, then Ctrl+F to search for text segments from the page. You should be able to find the content on the page.