During a hangout, one SEO professional asked John Mueller about web components for SEO.
Their question was: Is there any problem with using web components for SEO? Is it okay to use them for my website?
John explained that web components are essentially a way of using predefined components within a website.
Usually, web components are integrated with a JavaScript framework. The general idea here is that, as a web designer or as a web developer, you work with these existing components.
And the benefit of these components is that you don’t have to reinvent the wheel every time that something specific needs to happen on a web page.
For example: if you need a calendar on one of your pages, then you just use a web component for a calendar, and then you are done.
When it comes to SEO, these web components are implemented using various forms of JavaScript.
And Google can process pretty much most JavaScript when it comes to Google search. While John would like to say blindly that everything will be supported, he recommends that you test each component.
The best way to do so is in Search Console, where there is the inspect URL tool. There, you can insert your URL, and you will see what Google will render for the page for the HTML.
You will be able to see it on the screenshot, first of all, and then you will also be able to see the rendered HTML.
You can also double check what Google is able to pick up from your web components.
And, if you think that the important information is there, then perhaps you are all set.
If you think that some of the important information is missing, then you can drill down and try and figure out what is getting stuck there.
Google also has a lot of documentation on JavaScript websites and web search nowadays. John recommends reading this documentation as well.
Furthermore, be sure to look up documentation from Martin Splitt on John Mueller’s team. He has written a lot of this documentation. Martin can also be found on Twitter.
This happens at approximately the 03:07 mark in the video.
John Mueller Hangout Transcript
John (Submitted Question) 03:07
The first one I have is: is there any problem with using web components for SEO? Or is it okay to use them for my website?
John (Answer) 03:15
So web components are essentially a way of using predefined components within a website. Usually, they’re integrated with kind of a JavaScript framework. And the general idea there is that as a web designer, as a web developer, you work with these existing components. And you don’t have to reinvent the wheel every time something specific is supposed to happen. For example, if you need a calendar on one of your pages, then you could just use a web component for a calendar, and then you’re done.
When it comes to SEO, these web components are implemented using various forms of JavaScript. And we can process pretty much most JavaScript when it comes to Google search. And while I would like to say just kind of like blindly everything will be supported, you can test this and you should test this. And the best way to test this is in Search Console, there’s the Inspect URL tool. And there you can insert your URL, and you will see what Google will render for that page, the HTML.
You can see it on the screenshot, essentially, first of all, and then also in the rendered HTML that you can look at as well. And you can double check what Google is able to pick up from your web components. And if you think that the important information is there, then probably you’re all set. If you think that some of the important information is missing, then you can drill down and try to figure out what is getting stuck there. And we have a lot of documentation on JavaScript websites and web search nowadays.
So I would double check that. Also Martin Splitt on my team, he has written a lot of these documentations, he’s also findable on Twitter. He sometimes also does office hours like this, where he goes through some of the JavaScript SEO questions. So if you’re a kind of a web developer working on web components, and you’re trying to make sure that things are being done well, I would also check that.