如何防止 Google 将 URL 中的会话 ID 编入索引? [英] How to keep Google from indexing the Session ID in the URL?

查看:66
本文介绍了如何防止 Google 将 URL 中的会话 ID 编入索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一个网站用于不接受 cookie 的旧手机,因此它使用基于 URL 的会话 ID.

One of my sites is for old mobile phones that don't accept cookies so it uses a URL-based Session ID.

但是,Google 正在将会话 ID 编入索引,因此当我在 Google 上搜索我的网站时,所有结果都带有特定的会话 ID.

However, Google is indexing the Session ID, so when my site is searched on Google, all the results come up with a specific Session ID.

在大多数情况下,当客人点击它时,该会话 ID 不再有效,但我至少遇到过一个案例,客人点击了来自 Google 的链接,并且实际上将他们登录到了其他人的帐户,这显然是一个巨大的安全漏洞.

On most occasions, that Session ID is no longer valid by the time a guest clicks on it, but I've had at least one case where a guest clicked on a link from Google and it actually logged them into someone else's account, which is obviously a huge security flaw.

那么我如何才能让 Google 不将我的 URL 中的会话 ID 编入索引?如果有帮助,Google 网站站长工具中的会话 ID 始终设置为代表网址".

So how can I keep Google from indexing the Session ID in my URL's? In case it helps, the Session ID has always been set to "Representative URL" in Google's Webmaster Tools.

推荐答案

看看这个,https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls,您可以设置规范网址,google-bot 将使用此网址进行抓取您的网页,这也可以解决同一网页的重复网址问题.

Check this out, https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls, you can set canonical urls and google-bot will use this url to crawl your webpage, this can also solve duplicate url issues for the same webpage.

这篇关于如何防止 Google 将 URL 中的会话 ID 编入索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆