Search code examples
androiddeep-linkingandroid-app-indexing

Google App Indexing: how to map my website links and app deep links


I'm an Android Developer and I've been asked to implement app indexing in an app I've recently been developing. The app is the app-version of this web hotel search engine: https://www.hotelsclick.com and is already live: https://play.google.com/store/apps/details?id=com.towers.hotelsclick

Now, I understand that the best thing to do in order to tell google about my app deep-links is to have a correspondence between website URLs and app URIs.

In the website I can link to a specific hotel (i.e. https://www.hotelsclick.com/?hotel_id=135738) and I think this would be good for app indexing because I could tell google that when the user is mobile-searching for that hotel, most probably by name and not by ID ;-), he could be redirected to a specific activity of my app passing that ID as a parameter. I guess the URI could be something like myappbaseuri://hotel_id/135738, right?

Now, there are some questions that come to my mind:

1- Will Google automatically map the hotelsclick.com/?hotel_id=something queries to the myappbaseuri://hotel_id/something? If not, where should I tell him and how? Of course I don't want to specify ID by ID, and I guess it's not needed as well...

2- Right now the app does not implement all the features the website does, and there's not a corresponding activity for each website page. Shall I put in the .noindex file all the urls of the website that don't have a matching screen in the app? Isn't there a way to tell google just the pages which correspond, and therefore ignore the rest for app indexing?

Thank you for any answer you'll be able to provide. I hope I didn't get all the topic in the wrong way and the question is not off-topic


Solution

  • You can map the urls of the website to the screens of the app in two ways - by mentioning the deep link in sitemap or on each of the web pages. This link describes clearly how you can go about doing this.

    To answer your two questions,

    1. I assume that on the website, you generate the pages dynamically using the hotel_id. In each of these pages you can mention a rel="alternate" link in the head dynamically. This will do the job of linking the pages to screens on app. This, like you said, is not a manual process.
    2. Putting a noindex file on the website is a mistake for what you are trying to achieve. If you include a url in a noindex file, you are not telling Google that there is no corresponding screen on the app. You are actually telling it not to crawl and index the web page. This is obviously not what you want. To achieve what you are trying to do, all you have to do is not mention any deep link as rel="alternate" in the head section of the page. That's all.

    Hope that was clear.