SEO Friendly Widgets

As stated in the documentation, widgets should have crawlable a tags.

I’ve implemented SEO friendly urls following the docs and I’m passing a createUrl function to the InstantSearch component. However, all the react-instantsearch widgets seem to be rendered as inputs with onclick events.

Am I missing something or is the HTML rendered by the default widgets not searchable?

Hi Jonne,

That’s indeed right, the widgets were originally made at a time when the SEO implications of having links or not for widgets had not yet been well researched. To prevent a complicated to migrate breaking change from inputs to links (as well as it not always being the best option) we have kept the widgets as-is.

Widgets which render as links are: pagination, menu and hierarchicalMenu, since those can be seen as “category-defining”.

For other widgets where you want custom UI using links, we advise using the connectors to make your own UI.

Hope that makes sense, have a nice day!

Hi Haroen,

This makes sense. Thank you!

1 Like