質問

次のヘッダーでは、すべてのサイトマップで同じ2つのエラーが発生します。 Googleがサイトマップを読み取れない場合、各URLの優先順位が同じであると言うことができるため、混乱を招きます。ヘッダーは、XML宣言の後、行2としてカウントされます。 Googleは、マップのURLの約2%のみをインデックスに登録したと主張しています。助けてください。

  

更新:問題は、スキーマに対して検証する方法がわからないことだと思います。方法は?

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

==Parsing error
We were unable to read your Sitemap. It may contain an entry we are 
unable to recognize. Please validate your Sitemap before resubmitting.

==Notice
All the URLs in your Sitemap have the same priority...

更新:最初にXMLを検証するので、しばらくお待ちください。エラーがわかりません。

Errors in the XML document:
    4:  80  SchemaLocation: schemaLocation value = 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd' must have even number of URI's.
    4:  80  cvc-elt.1: Cannot find the declaration of element 'urlset'.

XML document:
1   <?xml version="1.0" encoding="UTF-8"?>
2   <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4     xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
5     <url>
6       <loc>http://nutrograph.com/1-butter-salted</loc>
7       <changefreq>monthly</changefreq>
8       <priority>0.8</priority>
9     </url>
10    <url>
11      <loc>http://nutrograph.com/2-butter-whipped-with-salt</loc>
12      <changefreq>monthly</changefreq>
13      <priority>0.8</priority>
14    </url>
15  </urlset>
役に立ちましたか?

解決

次のスキーマに対してXMLを検証しました: http:// www .sitemaps.org / schemas / sitemap / 0.9 / sitemap.xsd

はいの場合、結果はどうでしたか?

そうでない場合、サイトマップのURLは何ですか?

スキーマに対してXMLを検証する方法がわからない場合は、 http://www.xmlvalidation.comを使用します/

そこにサイトマップXMLを貼り付け、[外部XMLスキーマに対して検証]をクリックします。 [検証]ボタンをクリックした後、スキーマを貼り付けます。

これにより、XMLの何が問題なのかがわかります。結果の解釈方法がわからない場合は、元の質問を適宜修正してください。

編集:エラーは、schemaLocationに存在しないnamesapce-URLでした。最初のタグは次のようになります。

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

他のヒント

上記を打ちます。 Googleのサイトを見ると、サイトマップヘッダーはあなたより少し長いようです。

次のページにあります: https://www.google。 com / webmasters / tools / docs / en / protocol.html

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

schemaLocationに2つのURiがあることに注意してください(偶数のURIが必要です)

次のようになります。 **

  

xsi:schemaLocation =&quot; http://www.sitemaps.org/schemas/sitemap/0.9    http://www.sitemaps.org/schemas/sitemap/0.9/sitemap。 xsd &quot;

**

この構文にも何か欠けていました

  

  xmlns:xsi =&quot; http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation =&quot; http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xs"&gt;

この構文に欠けていたものはありますか?!

ただの文字「d」 url拡張の最後( http://www.sitemaps.org/schemas/ sitemap / 0.9 / sitemap.xs

文字「&d;」を追加した後、この問題を解決します

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top