简体   繁体   English

Google App索引:如何映射我的网站链接和应用程序深层链接

[英]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. 我是一名Android开发人员,被要求在我最近开发的应用程序中实现应用程序索引编制。 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 该应用程序是此网络酒店搜索引擎的应用程序版本: https//www.hotelsclick.com ,并且已经启用: https//play.google.com/store/apps/details?id = com.towers。酒店点击

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. 现在,我了解到,要告诉Google我的应用深链接,最好的办法是在网站URL和应用URI之间建立对应关系。

In the website I can link to a specific hotel (ie 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. 在网站上,我可以链接到特定的酒店(即https://www.hotelsclick.com/?hotel_id=135738 ),并且我认为这对应用程序索引非常有用,因为我可以告诉Google用户何时进行移动搜索对于该酒店,很可能是通过名称而不是ID ;-),他可以被重定向到我的应用程序的特定活动,并通过该ID作为参数。 I guess the URI could be something like myappbaseuri://hotel_id/135738, right? 我想URI可能类似于myappbaseuri:// hotel_id / 135738,对吗?

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? 1- Google是否会自动将hotelsclick.com/?hotel_id=something查询映射到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... 当然,我不想按ID指定ID,我想也不需要...

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. 2-目前,该应用程序尚未实现网站所具有的所有功能,并且每个网站页面都没有相应的活动。 Shall I put in the .noindex file all the urls of the website that don't have a matching screen in the app? 我应该在应用程序中没有匹配屏幕的网站的所有网址中都放入.noindex文件吗? Isn't there a way to tell google just the pages which correspond, and therefore ignore the rest for app indexing? 有没有办法只告诉Google对应的页面,从而忽略其余的应用程序索引?

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 我希望我不会以错误的方式得到所有的话题,而且这个问题不是题外话

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. 我假设在网站上,您使用hotel_id动态生成页面。 In each of these pages you can mention a rel="alternate" link in the head dynamically. 在这些页面的每一个中,您都可以在标题中动态提及一个rel =“ alternate”链接。 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. 将noindex文件放在网站上是您要实现的错误。 If you include a url in a noindex file, you are not telling Google that there is no corresponding screen on the app. 如果在noindex文件中包含url,则不会告诉Google该应用程序上没有相应的屏幕。 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. 要实现您想做的事情,您要做的就是在页面的开头部分中未将任何深层链接提到为rel =“ alternate”。 That's all. 就这样。

Hope that was clear. 希望那是清楚的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM