[lit] Are websites built with Lit per se not crawlable by the googlebot? #3345
raphaellueckl
started this conversation in
General
Replies: 1 comment 1 reply
-
It seems to be working okay to me? I tried codepleb.net in the mobile-friendly tester and it displays the contents fine. https://search.google.com/test/mobile-friendly/result?id=FlkTMv_QGM8ZMOBfoHBZcA Per the SEO doc you linked, Web Components are supported with the shadow and light DOM contents flattened. https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics#web-components |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I built several apps using lit already and I love the framework!
However, when I test them on the mobile friendly tester from google, I can't see anything in the rendered HTML. https://search.google.com/test/mobile-friendly/result?id=SZkEMlU3McST4HGvwb4jWw&url=http%3A%2F%2Fgoogle.com%2F
Google recommends this tester here: https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics.
And they mention that "if you don't see anything in the rendered HTML, the googlebot also won't see it".
You can check https://codepleb.net for testing, that consists of only content within shadow-doms in more shadow-doms.
The reason for this is not LIT, but the shadow-dom, it seems. I tried hard to find info about googlebot and crawling shadow-doms. Seems like the google bot can read the light-dom only in custom elements. This means, that if you have shadow-dom in shadow-dom and the first shadow-dom has no light-dom, the google bot won't see anything.
Is this true, or am I misguided? I attended a speech at the university where a google developer said that it's a myth, that the googlebot would not crawl shadow-doms. Not sure what to believe anymore. :/
Beta Was this translation helpful? Give feedback.
All reactions