Prevent deployed streamlit app from being indexed

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.

1 Like

I have the same exact question.

I will cross post on Discord to get some more eyes on it !

1 Like

From @randyzwitch

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

Discord thread

Does this mean that all Streamlit Cloud apps are indexed ?

Thanks as always @randyzwitch

It actually means the opposite! Streamlit Cloud apps are currently not indexed. Making apps indexable is a Q4 2022 roadmap item: https://roadmap.streamlitapp.com/#apps-are-indexed-by-google-scoping-speccing

1 Like

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.

2 Likes

Thank you both for the help :slightly_smiling_face:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.