SEO Best Practices for Dyamic Pages in AEM | Adobe Higher Education
Skip to main content
chavad
Level 2
November 4, 2024
해결됨

SEO Best Practices for Dyamic Pages in AEM

  • November 4, 2024
  • 2 답변들
  • 680 조회

Hey All, 

We have many components that load dynamically rendering through react in front-end. These don't have markup in slightly as it is generated dynamically via react code based on the scenario. How can we make these pages SEO indexable? Does keeping dummy markup in HTL files help? Any other suggestions?

이 주제는 답변이 닫혔습니다.
최고의 답변: daniel-strmecki

Hi @chavad,

keeping dummy markup in HTL files will indeed help, but a better solution would be to deliver fully rendered content to SEO robots. This can be done using third-party pre-rendering services, such as Prerender.io, or building it yourself with Node.js.

 

In case you want to build it custom, you first need to detect bots with user-agent on the CDN level and redirect them to your Node.js application. Puppeteer is a popular library that can open a headless instance of Chrome, load the page, and wait for it to fully render before capturing the HTML. Then you can return fully rendered HTML to bots.

 

Good luck,

Daniel

2 답변

Level 3
November 4, 2024
daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 4, 2024

Hi @chavad,

keeping dummy markup in HTL files will indeed help, but a better solution would be to deliver fully rendered content to SEO robots. This can be done using third-party pre-rendering services, such as Prerender.io, or building it yourself with Node.js.

 

In case you want to build it custom, you first need to detect bots with user-agent on the CDN level and redirect them to your Node.js application. Puppeteer is a popular library that can open a headless instance of Chrome, load the page, and wait for it to fully render before capturing the HTML. Then you can return fully rendered HTML to bots.

 

Good luck,

Daniel

Tethich
Community Advisor
Community Advisor
November 5, 2024

Two small thoughts here, if you allow me.

1. Useful package for achieving SSR using node.js is ReactDOMServer

2. We need to pay attention to React lazy loading, in case it is used. Too much of it can affect SEO.