Check out what’s new from Firebase@ Google I/O 2021, and join our alpha program for early access to the new Remote Config personalization feature. Learn more

Refine Public Content Indexing

If your public app content includes elements you don’t want to include in Google Search results, you can make the following adjustments:

  • Exclude specific pages from Search results: To specify the URLs you want to exclude from Google Search results, create a noindex.xml file. This is similar to how the robots noindex meta tag works for websites.
  • Exclude real-time app notifications from Search results: Add a specific exclude tag for app notifications to the noindex.xml file.

Flag excluded URLs

To exclude specific URLs or app notifications from Search results, set up a noindex.xml file. The noindex.xml file includes information about the URLs you want to exclude, so Google can identify these links and exclude them from Search results. You can only exclude public content in your app from Google Search results. Personal content is only included in on-device results from In Apps searches.

  1. Create a new XML file in your app's XML resources directory: res/xml/noindex.xml.
  2. Use statements with specific attributes to indicate the parts of your app to exclude from Google Search. These attributes are as follows:
    • uri—Excludes a specific URI from Google Search. Google doesn't index URLs that exactly match this attribute.
    • uriPrefix—Excludes all content below a URI path from Google Search. Google doesn't index URLs starting with a string matching this attribute.
    • android:value="notification"—Excludes your app's notifications from Google Search. Google doesn't index the notifications of the app if you specify this attribute.

    In the following example, the noindex.xml file includes statements that exclude app notifications, a specific page, and hidden directories from Google Search results:

    <search-engine xmlns:android="">
        <noindex android:value="notification"/>
        <noindex uri=""/>
        <noindex uriPrefix=""/>
  3. After you add the noindex.xml file, reference it from a meta-data tag within the application section of the app's AndroidManifest.xml file with the following line:
        android:resource="@xml/noindex" />

Next: Log User Actions