How to Test Open Graph Tags (and Debug Facebook and LinkedIn Previews)
Test the HTML, the image and the platform separately, and know what each tool can and cannot tell you.
Testing Open Graph tags is easier when you separate three questions: are the right tags in the HTML, can the image be fetched, and what does a particular platform show? Different tools answer different questions, and no single tool answers all three for every platform.
1. Check the HTML your server delivers
- Open the page and use view-source (not the browser's Elements panel, which shows the page after JavaScript has run).
- Search for og: and confirm og:title, og:type, og:image, og:url and og:description are present once each.
- Check that the values belong to this page and contain no template placeholders.
An analyzer automates this and goes further. The Open Graph & Social Preview Analyzer fetches the page, lists every tag including duplicates, explains missing or inconsistent ones, and shows preview approximations with the source of each value. It reads the delivered HTML and does not execute JavaScript, which matches what most social crawlers see.
2. Check the image
- Open the og:image URL in a private window. It should load without logging in.
- Confirm it is a PNG or JPEG of reasonable size (see Open Graph image size).
- Check the HTTP status and Content-Type, and whether the URL redirects.
3. Use the platform's own tools
Only a platform can tell you what its crawler read and what its cache holds. The common ones are:
- Facebook's Sharing Debugger shows what Facebook's crawler found at a URL, any warnings, and offers a way to scrape the URL again.
- LinkedIn's Post Inspector fetches a URL, shows the preview LinkedIn would build, and refreshes LinkedIn's stored copy.
- For X, tooling for previewing cards has changed over time. Check X's current documentation for what is available, and test by sharing the link where you can do so safely.
These tools and their behavior change, so follow each platform's current documentation instead of fixed instructions. They are also the authority on that platform: if the analyzer and a platform disagree, the platform's result is the one your readers will see.
Debugging Facebook previews
- Make sure the URL you test is exactly the URL people share, including http versus https and any redirects.
- Read the warnings the debugger shows, such as missing properties or an inaccessible image.
- After fixing the page, use its scrape-again option, and use a new image file name if the old image persists.
Debugging LinkedIn previews
- Inspect the exact shared URL and read the title, image and domain it shows.
- LinkedIn commonly shows the title, image and domain; do not expect a long description.
- Inspect again after changes to refresh its stored copy.
A repeatable routine
| Step | Tool | Answers |
|---|---|---|
| 1 | View source or an analyzer | Are the tags in the delivered HTML? |
| 2 | Analyzer image section or a private window | Can the image be fetched, and is it suitable? |
| 3 | Platform debugger | What does this platform read and store? |
| 4 | A real test share | How does it look in practice? |
Test the final URL
If your link redirects, test the address people actually paste, and check where it ends up. Crawlers build the preview from the final page.
Frequently asked questions
- How do I test my Open Graph tags?
- View the page source and confirm the tags are present, check that the image URL loads publicly, then use an analyzer for a full report and each platform's own debugging tool for the platform-specific result.
- How do I debug a Facebook link preview?
- Facebook provides the Sharing Debugger, which shows what its crawler read from a URL and lets you request a fresh scrape. Check Facebook's current documentation for its exact behavior.
- How do I debug a LinkedIn link preview?
- LinkedIn provides the Post Inspector, which fetches a URL and shows the preview LinkedIn would build and can refresh LinkedIn's stored copy. Check LinkedIn's current documentation for details.
- Is a third-party Open Graph checker accurate?
- It can accurately show what your server delivers and flag problems, but it cannot reproduce exactly what a platform's crawler and cache will show. Treat it as a diagnostic, and confirm important links in the platform's own tool.
Try it yourself
The tool that pairs with this guide.
Did this help you untangle your redirects?
If these free developer tools save you time, consider buying me a byte. Your support helps keep DevCraftKit free and growing.
Related articles
What Are Redirect Chains? Causes, Impact and How to Fix Them
Several hops where one would do: how redirect chains form, what they cost, and how to find and fix them.
Published
301 vs 302 vs 307 vs 308 Redirects: Which Status Code to Use
Two questions decide the code: is the move permanent, and must the request method be preserved?
Published
What Is Open Graph and How Does It Work?
The meta tags behind every link card: what Open Graph is, how platforms use it, and how a preview is built from your page.
Published