How to Get Your App Indexed in Google

Written by: on December 18, 2015

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 App Indexing for iOS

Google supports app indexing only for iOS 9 and greater. To add app indexing, follow these steps:

  1. Support universal links in your app
  2. Add the Google app indexing SDK
  3. Test your implementation

1. Support universal links in your app

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:

  1. Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle.
  2. Upload the apple-app-site-association file to your HTTPS web server.
  3. Prepare your app to handle universal links by adopting the UIApplicationDelegate methods to open the content specified by the URL.

2. Add the Google App Indexing SDK

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.

Next, add #import <GoogleAppIndexing/GoogleAppIndexing.h> to your UIApplicationDelegate. Finally, register your app by adding [[GSDAppIndexing sharedInstance] registerApp:your iTunes ID]; to your application:didFinishLaunchingWithOptions: method.

3. Test your implementation

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.

Google App Indexing for Android

Follow these steps to get your Android app content indexed by Google:

  1. Support HTTP URLs
  2. Add the Google app indexing API
  3. Test your implementation

1. Support HTTP URLs

There are 3 steps to support HTTP URLs in Android:

  1. Add intent filters to specify which URL schemes your app can handle. See Google’s page for enabling deep links.
  2. 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.
  3. 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.

2. Add the Google app indexing API

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.

3. Test your implementation

After you have implemented app indexing, there are 3 areas you should test:

  1. 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.
  2. Test your app indexing API calls by either using the ADB or using the Search Console Fetch as Google tool.
  3. 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.

Jeremiah Gage

Jeremiah Gage

Jeremiah is a software engineer who specializes in iOS development. He moved to Denver, Colorado in 2014 to work for POSSIBLE Mobile. Jeremiah is also an avid billiards (pool) player and instructor.
Article


Add your voice to the discussion: