I am using Bootstrap modal in my homepage. The content from the modals is not indexed by Google, while almost all other content in that page is indexed.

How can I index modal content?

2 Answers 2


Since the content of the modal "is hidden" until opened (so invisible for spiders) you could try to duplicate the same content on the index page outside of field of view for visitors but not for Google.

  • its not clear what u told, should i need to duplicate all the modal contents in the index page which is not visible to human? will spiders read that? Mar 21, 2017 at 8:35
  • not recommended. got to be real careful with this method @Valentin R. because if Google algo thinks you're hiding content from users while spamming its bot you're demote your homepage.
    – garth
    Apr 21, 2017 at 8:53
  • Totally agreed, I was saying to display it outside of field of view but accessible to users from button and google as code. Like burger menu or side content (even mega menus with content). Never had any problems with spam. Jun 6, 2017 at 17:09

Javascript modals are usually ignored by the Gbot since there's no actual URL that a bot can follow.

To do this successfully you'd need to use a CSS modal (ie. a script loads container content from the homepage into the modal) or probably a simpler way is to create a separate page with the same content, and include that page link in your sitemap xml. If it still doesn't get picked up by Google then you'd need to add a link to it somewhere buried in the site.

And in case you're wondering, it is not a good idea to try to hide content from users on your page (by using negative divs or text the same colour as the background etc.) and still present it to the Gbot, as Google tends to see that as spam content and will penalise your page for it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.