【问题标题】:Updating sitemap from django to google webmaster doesn't work将站点地图从 django 更新到谷歌网站管理员不起作用
【发布时间】:2023-03-19 14:08:01
【问题描述】:

我们的网站几乎每天都会更新。每次添加新页面时,我们都需要将站点地图更新给谷歌网站管理员。

我们已经尝试使用 ping_google() 以及所需的一组参数和 google,但它似乎永远不会更新网站管理员的站点地图。为了记录响应,我们重写了函数并记录了下面给出的响应:

    2010-10-01 09:00:02,489 DEBUG Sitemap Response: <html><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<head><title>Google Webmaster Tools
-
Sitemap Notification Received</title>
<meta name="robots" content="noindex, noodp">
<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">
   </script>
<script type="text/javascript">
     _uacct="UA-18009-2";
     _utcp="/webmasters/";
     _uanchor=1;
     urchinTracker();
   </script></head>
<body><h2>Sitemap Notification Received</h2>
<br>
Your Sitemap has been successfully added to our list of Sitemaps to crawl. If this is the first time you are notifying Google about this Sitemap, please add it via  <a href="http://www.google.com/webmasters/tools/">http://www.google.com/webmasters/tools/</a>  so you can track its status. Please note that we do not add all submitted URLs to our index, and we cannot make any predictions or guarantees about when or if they will appear.</body></html>

响应看起来不错。但是站点地图永远不会在网站管理员上更新。我们正在使用 django 1.1。除了 ping_google()

【问题讨论】:

    标签: python django sitemap urllib google-search-console


    【解决方案1】:

    您能否发布指向您的站点地图文件的链接。

    如果您为站点地图中的大多数 URL 设置了较高的优先级,Google 可能会认为这是一种垃圾邮件,并且不会费心下载站点地图。

    还要检查站点地图中的更改频率。

    如果您的站点地图很好并且内容每天都在变化,即使您不 ping 它,谷歌也会自动下载它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-12-25
      • 1970-01-01
      • 1970-01-01
      • 2017-11-27
      • 1970-01-01
      • 2014-02-04
      • 2015-04-10
      相关资源
      最近更新 更多