每次提交新文章后都会 Ping 谷歌站点地图吗?

发布于 2024-08-03 11:58:07 字数 1455 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

温柔戏命师 2024-08-10 11:58:07

是的,Google 允许使用该方法。

  1. 向以下 URL 发出您的请求:

    www.google.com/webmasters/tools/ping?sitemap=sitemap_url

    例如,如果您的站点地图位于 http://www.example.com/sitemap.gz,您的网址将变为:

    www.google.com/webmasters/tools/ping?sitemap=http://www.example.com/sitemap.gz

  2. ?sitemap=http://www.example.com/sitemap.gz

    URL 对 /ping?sitemap= 之后的所有内容进行编码:

    www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2Fwww.yoursite.com%2Fsitemap.gz

  3. 使用 wget、curl 或您选择的其他机制发出 HTTP 请求。

添加:

根据我刚刚给出的链接,其中有一个信息,谷歌说:

我们建议您每小时重新提交站点地图的次数不要超过一次。

Yes, that method is allowed by google.

  1. Issue your request to the following URL:

    www.google.com/webmasters/tools/ping?sitemap=sitemap_url

    For example, if your Sitemap is located at http://www.example.com/sitemap.gz, your URL will become:

    www.google.com/webmasters/tools/ping?sitemap=http://www.example.com/sitemap.gz

  2. URL encode everything after the /ping?sitemap=:

    www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2Fwww.yoursite.com%2Fsitemap.gz

  3. Issue the HTTP request using wget, curl, or another mechanism of your choosing.

ADDED:

Based on the link I just given, there is an info in there, google says:

We recommend that you resubmit a Sitemap no more than once per hour.

几度春秋 2024-08-10 11:58:07

Take a look at the code for the Google Sitemap Generator Plugin for Wordpress. A lot of people use that and it does not seem to slow things down enough to notice. Whatever methodology they are using should be a good place to start.

眼眸印温柔 2024-08-10 11:58:07

自 2015 年起,Google 不再在其文档中建议速率限制。

了解何时创建新文章符合 Google 的最大利益,因此值得使用您的站点地图(或者至少在新文章发布时使用某种“新鲜文章”站点地图)对其进行 ping 操作。

每次您 ping 时,Googlebot 都会请求您的站点地图。它发送请求标头来检查资源的新旧程度。因此,如果您打算频繁提交站点地图,请确保您的服务器能够正确处理请求。否则,您可能会返回 304(未修改),并且 Googlebot 实际上不会获取该文件。

As of 2015, Google no longer suggests a rate limit in their documentation.

It is in Google's best interest to know when fresh articles are created so it is worth pinging them with your sitemap, or at least some kind of "Fresh Articles" sitemap when new articles are published.

Googlebot will request your sitemap every time your ping it. It sends requests headers to check the newness of the resource. So if you plan on submitting a sitemap frequently, make sure your server will handle the request correctly. Otherwise, you might return a 304 (Not Modified) and Googlebot won't actually get the file.

嘿哥们儿 2024-08-10 11:58:07

无需再重新提交站点地图。 根据 Google 的说法,这种方法自 2020 年以来已过时:

重新提交站点地图

您不需要重新提交我们已经知道的站点地图,即使您已经更改了它。下次我们抓取您的网站时,Google 会注意到任何更改。

您可以查看这篇文章:使用站点地图报告管理您的站点地图 http://web.archive.org/

2020

在此处输入图片说明

2016

在此处输入图像描述

There is no need to resubmit sitemaps anymore. According to Google this approach is outdated since 2020:

Resubmit a sitemap

You shouldn't need to resubmit a sitemap that we already know about, even if you've changed it. Google will notice any changes the next time we crawl your site.

You can check this article: Manage your sitemaps using the Sitemaps report in http://web.archive.org/.

2020:

enter image description here

2016:

enter image description here

清欢 2024-08-10 11:58:07

当帖子更新时,Yoast 插件会自动 ping Google 和 Bing。

来源

The Yoast plugin automatically pings Google and Bing when a post is updated.

Source

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文