You write a great blog post, paste the link on Facebook or X, and the preview looks broken. There is no image, the title is cut off, or the description is a random line from your sidebar. That one bad preview can cost you clicks before anyone reads a word.
The fix is simple: add Open Graph tags and Twitter Card tags to your page. In this guide you will learn what they are, which tags matter, and how to generate them for free with the RankTools Open Graph & Twitter Card Generator.
<head> that tell social platforms which title, description and image to show when your link is shared. Twitter Cards do the same job for X (Twitter).
What Are Open Graph Tags?
Open Graph is a protocol Facebook introduced in 2010 so that any web page could control how it appears when shared. Today Facebook, LinkedIn, WhatsApp, Telegram, Discord, Pinterest and many other apps read these tags to build the link preview card.
Without OG tags, each platform guesses. With them, you decide exactly what people see.
What Are Twitter Card Tags?
X (formerly Twitter) uses its own set of tags that start with twitter:. If they are missing, X can fall back to your Open Graph tags, but adding them gives you control over the card type, especially the large image card that stands out in the feed.
Why Open Graph and Twitter Card Tags Matter for SEO and Traffic
Social tags are not a direct Google ranking factor, but they help your SEO indirectly:
- Higher click-through rate: A large image with a clear headline gets more clicks than a plain link or a tiny thumbnail.
- More shares and referral traffic: Good-looking previews are shared more, and more shares mean more visitors and more chances of earning backlinks.
- Consistent branding: Your site name, image style and message look the same on every platform.
- Control over your message: You write the hook instead of letting a bot pick random text.
The Most Important Open Graph Tags
| Tag | What it does |
|---|---|
og:title | The headline shown in the preview card |
og:description | A short summary below the title |
og:image | The thumbnail or large image of the card |
og:url | The canonical address of the page |
og:type | The kind of content, such as website or article |
og:site_name | Your brand or website name |
The Most Important Twitter Card Tags
twitter:card: the card style. Usesummary_large_imagefor a big image, orsummaryfor a small square thumbnail.twitter:titleandtwitter:description: the text shown on the card.twitter:image: the image for the card.twitter:siteandtwitter:creator: your @username, which connects the card to your account.
How to Generate Open Graph Tags with RankTools (Step by Step)
Writing these tags by hand is easy to get wrong. A missing quote or an unescaped character can break the whole tag. Our free generator does it for you:
- Open the Open Graph & Twitter Card Generator.
- Enter your Page Title and Page URL. These two are required.
- Add your Site Name and a short Description.
- Paste the direct link of your thumbnail in Image URL.
- Optionally add your Twitter username.
- Click Generate Meta Tags, then Copy Tags to Clipboard.
The tool handles the technical details for you:
- It automatically escapes special characters like quotes and angle brackets so your tags never break.
- It adds
https://to your URL if you forget it. - It chooses
summary_large_imagewhen you add an image, andsummarywhen you don't. - It adds the
@to your Twitter username if it is missing. - Everything runs in your browser, so nothing you type is sent to a server.
Example of Generated Output
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://www.ranktools.in">
<meta property="og:title" content="Free SEO Tools for Bloggers">
<meta property="og:description" content="A complete suite of free SEO and developer tools.">
<meta property="og:image" content="https://yoursite.com/image.jpg">
<meta property="og:site_name" content="RankTools">
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Free SEO Tools for Bloggers">
<meta name="twitter:description" content="A complete suite of free SEO and developer tools.">
<meta name="twitter:image" content="https://yoursite.com/image.jpg">
<meta name="twitter:site" content="@yourhandle">
<meta name="twitter:creator" content="@yourhandle">
Tip: The generator sets og:type to website. If you are tagging a blog post, you can change that value to article after copying.
How to Add the Tags to Your Website
Blogger
- Go to Blogger Dashboard → Theme → Edit HTML.
- Find the
<head>section. - Paste the generated tags just below the opening
<head>tag, or above</head>. - Save the theme.
Important for Blogger users: Most Blogger themes already output basic Open Graph tags for posts. Pasting the same tags again creates duplicates, and platforms may pick the wrong one. Check your page source first (right-click → View page source → search for og:title). Use the generator for static pages, your homepage, or when your theme has no OG tags at all.
To add tags for one specific page only, wrap them in a condition:
<b:if cond='data:blog.url == "https://www.yoursite.com/p/your-page.html"'>
</b:if>
WordPress
SEO plugins like Yoast SEO and Rank Math add these tags for you. If you prefer to do it manually, paste the code into your theme's header.php before </head>, or use a header-insertion plugin.
Custom HTML Websites
Paste the tags inside the <head> of each page. Every page should have its own title, description, URL and image.
<head>. If you paste them into the body of a post, social platforms will ignore them.
Best Practices for Open Graph Images and Text
- Image size: Use 1200 × 630 pixels (a 1.91:1 ratio). It works well on Facebook, LinkedIn and X.
- File size and format: Keep the image light (ideally under 1 MB) and use JPG, PNG or WebP. Compress it first with our free Image Compressor.
- Use a full URL: The image link must start with
https://and be publicly accessible. - Keep text readable: If your image has text, keep it large and inside the center, because some platforms crop the edges.
- Title length: Aim for about 60 characters or less so it is not cut off.
- Description length: Keep it under 200 characters, as the tool suggests, and make it a hook, not a copy of the title. Our guide on writing meta titles and descriptions can help.
- One unique image per page: Different posts should have different images so shared links are easy to tell apart.
How to Test Your Open Graph Tags
After adding the tags, check that they work:
- Use the Facebook Sharing Debugger to see how Facebook reads your page and to clear its cached preview.
- Use the LinkedIn Post Inspector to check and refresh your LinkedIn preview.
- For X, paste your link into a draft post and look at the preview before publishing.
Social platforms cache previews. If you changed your tags but still see the old image, use the debugger tools to force a refresh.
Common Mistakes to Avoid
- Relative image links like
/images/photo.jpg. Always use the full URL. - Missing og:image, which gives you a plain text link with no thumbnail.
- Duplicate tags from your theme and your manual code.
- Image too small, which gets shown as a tiny thumbnail or ignored.
- Mismatched URLs: Your
og:urlshould match your canonical URL. - Forgetting the cache: Old previews can stay for days unless you refresh them.
Frequently Asked Questions
Are Open Graph tags a Google ranking factor?
No. Google does not use them directly for ranking. They improve how your links look on social platforms, which can bring more clicks, shares and traffic.
Do I need both Open Graph and Twitter Card tags?
Open Graph tags cover most platforms. Twitter Card tags give you extra control on X. Using both is the safest option, and the generator creates both together.
What is the best image size for Open Graph?
1200 × 630 pixels is the most widely recommended size.
Why is my old image still showing after I changed it?
Platforms cache link previews. Run your URL through the Facebook Sharing Debugger or LinkedIn Post Inspector to refresh it.
Is the RankTools generator free?
Yes. It is 100% free, needs no signup, and works in your browser.
Do I need to add the tags to every page?
Ideally yes, with unique values for each page. On platforms like WordPress, an SEO plugin does this automatically. On Blogger, your theme usually handles posts, so use the generator for pages and the homepage.
Conclusion
A well-made link preview takes a few minutes to set up and can improve how your content performs on every social platform. Generate your tags, add them to the <head>, test them, and enjoy cleaner, more clickable shares.
Try the Free Open Graph & Twitter Card Generator →
Related tools: SEO Meta Tag Generator · Image Compressor · UTM Link Builder



