Is there a good way to prevent the text from being indexed or captured by the Search API description? We have a global module that behaves as a “domain alert” that’ll display a dialog to the user when they are leaving the current domain into another that we are not managing. It should be noted that this module is on every page.
The issue here - when the user performs a search (we are ultizing the Site Search API). It is returning the global module text "You are leaving our website, etc.. etc..) in the description of that return. I attempted the following to prevent it from displaying:
1. class=“hs-search-hidden” on the parent div of this module
resource: Content Search - HubSpot docs
2. Added a “no-index” meta tag directly to the div along with the id=“no-index”.
3. Pushed the text via Javascript instead of straight HTML.
resource: Site Search | Frequently Asked Questions
What I can’t do is add in a robot.txt to perform this action as this is a module on every page.
What I did to bandaid this issue is to find and replace the paragraphs displayed through the JSON return but this is no real solution. I’m just hiding the information and not adjusting the return.
Are there any suggestions on how I can fix this issue?