メタタグとは
メタタグは、HTMLの<head>内に記述するタグで、ページの情報を検索エンジンやSNSプラットフォームに伝える役割を持ちます。ユーザーには直接表示されませんが、検索結果の表示やSNSでのシェア時の見た目に影響します。
SEOに重要なメタタグ
- title:
<title>ページタイトル</title>。検索結果のタイトルに使われる最重要要素。30〜35文字を目安に。 - description:
<meta name="description" content="説明文">。検索結果のスニペットに使われる。120〜130文字が目安。直接的なランキング要因ではないがCTR(クリック率)に影響する。 - robots:
<meta name="robots" content="index,follow">。クロールとインデックスの許可・禁止を指定。 - viewport:
<meta name="viewport" content="width=device-width, initial-scale=1">。スマートフォン表示の制御。モバイルSEOの必須設定。
OGP(Open Graph Protocol)タグ
OGPタグは、SNSでページをシェアしたときに表示されるタイトル・説明文・画像を指定します。
<meta property="og:title" content="ページタイトル">
<meta property="og:description" content="説明文">
<meta property="og:image" content="https://example.com/image.jpg">
<meta property="og:url" content="https://example.com/page">
Twitter Cardタグ
Xでのシェア時の表示を制御します。summary_large_imageを指定すると大きな画像付きカードで表示されます。
<meta name="twitter:card" content="summary_large_image">