Naar console

Get Started

To get public and personal content from your app into users’ search results in the Google app, start by setting up your app URLs and adding the Firebase App Indexing library.

Add Firebase and the App Indexing library

Although you don’t strictly need Firebase to get your app's public content indexed by Google, App Indexing can help you get more out of Search.

  1. If you haven't already, add Firebase to your Android project.
  2. In your project-level build.gradle file, make sure to include Google's Maven repository in both your buildscript and allprojects sections.
  3. Add the dependency for the Firebase App Indexing Android library to your module (app-level) Gradle file (usually app/build.gradle):
    implementation ''

Structure links to your app content

Structure your website and app so the URLs that point to pages on your site are the same URLs that point to views in your Android app. Google Search crawls your site for these links, then uses them to send users directly to your app.

For example, consider the simple website from the App Indexing codelab. The links in the app are the same HTTP URLs used on the website and follow a clear structure that matches page types to app view types. Follow this type of structure in your app and website.

The sample has two page types (for recipes and notes), but you could have many more page types on your site, each with a distinct link type. For example, includes the following link types:

  • Recipe Pages:*
  • Note Pages:*/note
  • But it could also include Cooking Class pages, using the following link types:

  • Cooking Class Registration Page:
  • Cooking Class Schedule Page:

Note that personal content added to the on-device index does not need a corresponding webpage. To learn more about adding personal content to an on-device index for appearance in autocomplete suggestions and In Apps searches, see Enable Personal Content Indexing.

To streamline your work, understand the number and types of links you'll need to support before you start building your app. Also make sure you create good titles and descriptions for your pages.

Once you've defined your structure and start creating screens in your app, remember that you also need back navigation. Users should return to the previous screen if they tap the back button after opening a link.

Add Android App Links to your app

For both public content included in Google Search results and personal content included in Google's on-device In Apps search, handle links to your app through Android App Links. Android App Links help you make sure users land in the right place when they open a link to your app. Users that don't have your app installed can also run your app without installing it through Android Instant Apps.

Android App Links include two major components:

  1. Deep links to your app content: Add intent filters to your manifest to define the HTTP URL mapping you set up in the step above, then configure your app to use data from the intents to send users to the right content. Learn more in Create Deep Links to App Content.
  2. Link verification: Configure your app to request link verification, confirming ownership of both your site and your app. Then, publish a Digital Asset Links file to your website that verifies your ownership. Learn more in Verify App Links.

The App Links Assistant in Android Studio walks you through the process outlined in the Android App Links documentation. Learn more about using the App Links Assistant.

Next: Refine Public Content Indexing