Social Media Optimization

How to Set Up OGP Tags for Social Media

OGP tags control how your content appears when shared on social media. Learn setup methods, recommended image sizes, and common mistakes to avoid.

6 min read2026-04-03

OGP tags (Open Graph Protocol) are HTML meta tags that control how your page appears when shared on social media — including the title, image, and description. Proper setup maximizes traffic from social platforms.

What Are OGP Tags?

OGP (Open Graph Protocol) is a set of HTML meta tags written in the <head> section that control how your page appears when shared on social platforms like Facebook, LINE, or Slack — including the title, description, and thumbnail image.

<meta property="og:title" content="Page Title" />

<meta property="og:description" content="Page description" />

<meta property="og:image" content="https://example.com/ogp.png" />

<meta property="og:url" content="https://example.com/page" />

<meta property="og:type" content="website" />

Why OGP Tags Matter

Without proper OGP tags, social shares may show no thumbnail or an irrelevant image. Proper configuration unifies your brand impression and significantly increases click-through from social media.

×2.5

Estimated CTR increase with proper OGP setup

1200×630px

Recommended og:image size

40%

Percentage of sites with no OGP tags

Essential OGP Tags

TagDescriptionRequired
og:titleTitle shown on social media (max 95 chars)Required
og:descriptionDescription shown on social media (max 200 chars)Required
og:imageThumbnail image URL for sharesRequired
og:urlCanonical URL of the pageRequired
og:typeContent type (website / article, etc.)Required
og:site_nameSite nameRecommended
og:localeLanguage and region (e.g., en_US)Recommended

Twitter Card Tags (for X)

TagDescription
twitter:cardCard type (summary_large_image recommended)
twitter:titleTitle shown on X (falls back to og:title)
twitter:descriptionDescription shown on X (falls back to og:description)
twitter:imageThumbnail image URL for X (falls back to og:image)

og:image Setup Guide

og:image is the most critical tag for first impressions on social media. Incorrect size or format can prevent the image from showing or cause unwanted cropping.

ItemRecommendedNotes
Size1200×630pxMinimum 600×315px
Aspect ratio1.91:1Standard landscape ratio
File formatJPEG / PNGGIF/WebP may not work on all platforms
File sizeUnder 8MBUnder 1MB recommended
URL typeAbsolute URL requiredRelative paths won't work

Common Mistakes to Avoid

No og:image set

The most common mistake. Without og:image, shares will show no thumbnail, drastically reducing click-through rates. Set it on every page.

Using relative paths for og:image

Always use an absolute URL (starting with https://) for og:image. Relative paths cannot be resolved by most social platforms.

og:description is too long

Facebook truncates descriptions at around 200 characters. Put key information first and keep descriptions concise.

Using the same OGP image and description on every page

Setting unique og:image and og:description for key pages like blog posts and product pages improves brand experience and click-through rates.

Check Your Site's OGP Settings

Enter a URL to instantly check your OGP tag settings including og:title, og:description, and og:image. Also checks Twitter Card and structured data.

今井政和

Written by

今井政和

SEO Director / Frontend Developer

SEO Director with 20+ years of web industry experience. Creator of SEO_CHECK and the official WordPress plugin "ORECTIC SEO CHECK." Author of a book on web strategy inspired by Edo-era merchant principles.

@imai_director

FAQ

Apakah OGP tag memengaruhi peringkat SEO?
OGP tag tidak secara langsung memengaruhi peringkat pencarian Google. Namun, OGP tag secara signifikan memengaruhi click-through rate (CTR) ketika konten dibagikan di media sosial. Thumbnail dan deskripsi yang menarik dalam kiriman sosial mendorong lebih banyak traffic ke situs Anda, sehingga secara tidak langsung meningkatkan visibilitas keseluruhan.
Berapa ukuran og:image yang direkomendasikan?
Ukuran og:image yang direkomendasikan adalah 1200×630px dengan rasio aspek 1.91:1. Format JPEG atau PNG lebih disarankan, dan ukuran file sebaiknya di bawah 8MB. Untuk X (Twitter), minimum 600×314px direkomendasikan (maksimum 4096×4096px).
Apa perbedaan antara Twitter Card dan OGP?
OGP (Open Graph Protocol) adalah standar yang digunakan oleh Facebook, LINE, Slack, dan banyak platform sosial lainnya. Tag Twitter Card (twitter:card, dll.) adalah ekstensi khusus X (sebelumnya Twitter). X juga membaca OGP tag sebagai fallback, tetapi direkomendasikan untuk menetapkan tag Twitter Card maupun OGP agar tampilan paling akurat.
Bagaimana cara memeriksa pengaturan OGP saya?
Anda dapat memeriksa pengaturan OGP tag secara gratis dengan memasukkan URL Anda di alat SEO Score Diagnosis milik SEO_CHECK. Alat ini memeriksa og:title, og:description, og:image, og:url, dan lainnya. Facebook's Sharing Debugger (developers.facebook.com/tools/debug) juga berguna untuk membersihkan cache OGP dan melihat pratinjau konten yang dibagikan.
Bagaimana cara mengatur OGP tag di WordPress?
Ada dua cara utama untuk mengatur OGP di WordPress. Pertama, gunakan plugin SEO seperti Yoast SEO atau All in One SEO Pack — ini memungkinkan konfigurasi mudah dari dashboard admin. Kedua, output OGP tag secara langsung di functions.php menggunakan hook wp_head(). Menggunakan plugin direkomendasikan karena mengurangi kemungkinan kesalahan konfigurasi.