facebook twitter hatena line email

「SEO/sitemap」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(プログラムで検索ページsitemap作成の注意点)
行87: 行87:
 
参考:
 
参考:
 
http://detail-cc.com/seomaster/daily_news/2015/07/17/seo-news-2015%E5%B9%B47%E6%9C%886%E6%97%A5%EF%BC%88%E6%9C%88%EF%BC%89%EF%BD%9E7%E6%9C%8817%E6%97%A5%EF%BC%88%E9%87%91%EF%BC%89/
 
http://detail-cc.com/seomaster/daily_news/2015/07/17/seo-news-2015%E5%B9%B47%E6%9C%886%E6%97%A5%EF%BC%88%E6%9C%88%EF%BC%89%EF%BD%9E7%E6%9C%8817%E6%97%A5%EF%BC%88%E9%87%91%EF%BC%89/
 +
 +
==アプリ連携時のsitemapの書き方==
 +
    <url>
 +
      <loc>http://example.com/mypage</loc>
 +
      <lastmod>2011-06-27T19:34:00+01:00</lastmod>
 +
      <xhtml:link rel="alternate" href="android-app://com.example/hoge/example.com/list?k=hoge1" />
 +
    </url>
  
 
==プログラムで検索ページsitemap作成の注意点==
 
==プログラムで検索ページsitemap作成の注意点==

2015年10月4日 (日) 13:29時点における版

googleのsitemap推奨フォーマット

http://googlewebmastercentral.blogspot.jp/2014/10/best-practices-for-xml-sitemaps-rssatom.html

Example of an XML sitemap:

<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <url>
   <loc>http://example.com/mypage</loc>
   <lastmod>2011-06-27T19:34:00+01:00</lastmod>
   <changefreq>daily</changefreq>
   <priority>0.5</priority>
 </url>
 <url>
   ...
 </url>
</urlset>

sitemap_changefreqのデータ

  • always:常に
  • hourly:1時間ごと
  • daily:1日ごと
  • weekly:週ごと
  • monthly:月ごと
  • yearly:年ごと
  • never:更新してない

sitemapにimageを追加

   <url>
     <loc>http://example.com/mypage</loc>
     <lastmod>2011-06-27T19:34:00+01:00</lastmod>
     <image:image>
       <image:loc>http://example.com/page.png</image:loc>
       <image:title>画像タイトル</image:title>
       <image:caption>画像の説明文</image:caption>
     </image:image>
   </url>

参考ページ

http://lblevery.com/sfn/attract/wmt/sitemap-create/

http://www.adminweb.jp/wmt/sitemap/index8.html

googleのrss推奨フォーマット

Example of an RSS feed:

dc:dateでなくpubDateを使う

<?xml version="1.0" encoding="utf-8"?>
<rss>
 <channel>
   <item>
     <link>http://example.com/mypage</link>
     <pubDate>Mon, 27 Jun 2011 19:34:00 +0100</pubDate>
   </item>
   <item>
     ...
   </item>
 </channel>
</rss>

Example of an Atom feed:

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <entry>
   <link href="http://example.com/mypage" />
   <updated>2011-06-27T19:34:00+01:00</updated>
 </entry>
 <entry>
   ...
 </entry>
</feed>

sitemap登録

サーチコンソールから行う https://www.google.com/webmasters/tools/home?hl=ja

このサイトにはxmlのsitemapと(rss/atom)が登録できるので両方登録しておく(by google両方推奨)

priorityはあまり重要でない

lastmodを使う。

参考: http://detail-cc.com/seomaster/daily_news/2015/07/17/seo-news-2015%E5%B9%B47%E6%9C%886%E6%97%A5%EF%BC%88%E6%9C%88%EF%BC%89%EF%BD%9E7%E6%9C%8817%E6%97%A5%EF%BC%88%E9%87%91%EF%BC%89/

アプリ連携時のsitemapの書き方

   <url>
     <loc>http://example.com/mypage</loc>
     <lastmod>2011-06-27T19:34:00+01:00</lastmod>
     <xhtml:link rel="alternate" href="android-app://com.example/hoge/example.com/list?k=hoge1" />
   </url>

プログラムで検索ページsitemap作成の注意点

  • keywordの中にspace2つ入ってるものがないか
  • keywordの中に全角spaceがないか
  • keywordの先頭と最後にspaceが入っているものがないか
  • keyword内に改行が入ってないか(改行をurlencodeすると%0Aになりフレームワークのrouterでurldecodeできなくなる)

PubSubHubbubとは

高速indexさせるためのツール

参考

https://www.peko.co.jp/search-console/function/xml-sitemap-3015