How to Get Your App Indexed in Google
Providing easy access to content in your app is a must for giving a better experience for your users and also helps bring in new users. Google’s search engine is a great tool for discovering content and continues to expand its reach for more relevant data in mobile apps. Here are a few tips and tricks to help your get content from an iOS or Android app indexed into Google.
Your mobile app might contain data such as recipes, shows, songs and events. Until recently, there was no easy way to get from a Google search result directly to the in-app content. If your app has content that can only be accessed within the app, it is imperative to surface that data and make it more discoverable for users.
Google supports app indexing only for iOS 9 and greater. To add app indexing, follow these steps:
Starting with iOS 9, iOS allows an app to handle universal links so a user can be directed to content specified by a URL. There are 3 steps for adding universal links to your app:
- Create an
apple-app-site-associationfile that contains JSON data about the URLs that your app can handle.
- Upload the
apple-app-site-associationfile to your HTTPS web server.
- Prepare your app to handle universal links by adopting the UIApplicationDelegate methods to open the content specified by the URL.
The Google App Indexing SDK must be added through CocoaPods. Add
pod 'GoogleAppIndexing' to your Podfile and run
pod install to generate an Xcode workspace that contains your project with the app indexing SDK.
#import <GoogleAppIndexing/GoogleAppIndexing.h> to your UIApplicationDelegate. Finally, register your app by adding
[[GSDAppIndexing sharedInstance] registerApp:your iTunes ID]; to your
You can test your universal links by tapping a hyperlink in Safari and verifying your app redirects to the appropriate content.
For implementation details, see Google’s App Indexing for iOS.
Follow these steps to get your Android app content indexed by Google:
There are 3 steps to support HTTP URLs in Android:
- Add intent filters to specify which URL schemes your app can handle. See Google’s page for enabling deep links.
- Determine if your app was launched by a deep link by checking if
getIntent().getData()is not null in your launcher activity. Also verify
data.getScheme()matches your deep link scheme. Then redirect the user to the appropriate place in the app based on the host and path of the intent.
- Associate your app with your website using either the Google Search Console or Google Play. After the association has been made, you can use Fetch as Google to see how your app appears to Google.
The Google App Indexing API records user actions in your app along with content fields (e.g. titles, descriptions) to improve search quality. To enable the app indexing API, add Google Play services, import the appropriate classes, make the app indexing API calls, and indicate the app activity.
After you have implemented app indexing, there are 3 areas you should test:
- Use Android Studio to test your URLs. Android Studio will flag syntax errors for your intent filters and continuously scan your manifest for errors. You can also use the Android Debug Bridge (ADB) to test that your links open your app appropriately.
- Test your app indexing API calls by either using the ADB or using the Search Console Fetch as Google tool.
- Test your completed app by visiting a few pages in your app that call the app indexing API, then open the Google app on your device and type a query relevant to your app. The autocompletion should show results that display your app icon and lead to the correct place in your app. After your app is published on Google Play for a few days, you can check the Crawl Errors Report to ensure Google is able to access your app’s content.
For implementation details, see Google’s App Indexing for Android.