We are using Sitecore 10 and SXA. In our site, we have some composite component like accordion, tabs etc. When we are searching in google , we can see some links to our datasource items as well, like for tab 1, tab 2 items under composite datasource items. What could be the reason?
1 Answer
Normally content of composite components should not be linked anywhere. Instead it should be rendered inside generated html of page which uses that component.
Exception here is overlay, where in fact overlay content pages are linked from regular pages.
There is no way to tell really how your pages got indexed. If you want to avoid this for future, just add
<meta name="robots" content="noindex, nofollow">
to the Views\Layout\Composite Component Layout.cshtml
(and other composite layout files Views\Layout
folder) and to Views\OverlayLayout\OverlayMvcLayout.cshtml
in <head>
tag.
That should make sure that composite datasource items will never be indexed by bots.
yoursiteurl.com/sitemap.xml
if you are able to see those datasource items?