Hi. Is there any way how to prevent a hosted streamlit app from being indexed by Google?
Usually it would just be a case of adding <meta name=”robots” content=”noindex,nofollow”> to the header but with access to the main HTML being limited I couldn’t find a way how to add this in my app.
In most cases, Streamlit apps aren’t actually indexed…this is something we’re trying to fix though for Streamlit Cloud! If you are using a self-hosted app, adding a robots.txt file for noindexing should work like any other website
To add a subtlety to @snehankekre 's answer… there’s nothing explicitly to prevent an app from being indexed right now, though on a practical basis is doesn’t work well currently. At some point, we will fix that (per Snehan’s comment), but neither should be considered the basis of securing your app from the public.
robots.txt will suggest to search engines to not index, and password-protection will keep search engines from actually indexing the content.