Open Graph Protocol Basic Meta Tags: The Four Required Properties and How to Add Them

Quick Answer
The open graph protocol basic meta tags are four HTML metadata properties: og:title, og:type, og:image, and og:url. They describe a webpage so compatible social platforms can understand its title, content type, representative image, and destination when someone shares its link. Add them inside your HTML document's <head> element. Optional properties such as og:description, og:site_name, and og:image:alt provide additional context for richer previews.
Key Takeaways
- The four basic required properties are
og:title,og:type,og:image, andog:url. - Place Open Graph metadata inside the HTML document's
<head>element. - Choose an object type that accurately describes the page, such as
websiteorarticle. - Use a relevant, publicly accessible image URL for
og:image. - Add
og:descriptionandog:site_namefor additional sharing context. - Use
og:image:altto describe the image accurately. - Check the rendered page source and the relevant platform's preview after implementation. Cached previews may not update immediately.
What Is the Open Graph Protocol?
The Open Graph protocol is a metadata standard that helps webpages become recognizable objects in a social graph. In practical terms, it tells compatible services what information to associate with a webpage when someone shares its URL.
Without appropriate metadata, a sharing platform may need to select a title, description, or image from the available page content. The result might not represent the page as accurately as you intended.
Open Graph provides explicit information instead. A website owner can declare the preferred title, content type, image, and URL rather than leaving every decision to automatic extraction.
The protocol uses HTML <meta> elements with a property attribute and a corresponding content value. These declarations belong in the document head, not in the visible article body.
The official Open Graph Protocol specification explains the standard and its supported properties.
What Are the Four Basic Open Graph Meta Tags?
The official specification identifies four required properties for an Open Graph object. Each has a different responsibility, and all four contribute to identifying the content being shared.
1. og:title — The Shared Page Title
The og:title property defines the title of the object as it should appear in the social graph.
For an article, this will usually be its actual editorial headline. For a product page, it might be the product name. For a homepage, it could be the website's name or a suitable descriptive title.
Example:
``html
<meta property="og:title" content="A Practical Guide to Website Security">
``
Choose a title that accurately describes the destination. Avoid using a misleading promotional statement or a headline that belongs to another page.
Your Open Graph title can match your HTML title element, but the protocol does not require the two values to be identical. A website may use a search-focused title and a slightly different sharing title when both accurately represent the same content.
Google also documents og:title as one possible source among several when generating search-result title links. That limited relationship does not mean all Open Graph properties are Google ranking factors. See Google Search Central's guidance on title links.
2. og:type — The Object Type
The og:type property tells compatible consumers what kind of object the webpage represents.
Two useful examples are:
website— appropriate for a general website homepage or ordinary website object.article— appropriate for an editorial article or blog post.
Example for a blog post:
``html
<meta property="og:type" content="article">
``
Example for a general website page:
``html
<meta property="og:type" content="website">
``
Choose the value according to the actual content. An editorial article should not automatically be classified as a generic website simply because it lives on a website.
The protocol also defines more specialized object types. For example, its article type supports additional properties relating to publication time, modification time, author, section, and tags.
You can review the available categories in the official Open Graph object types documentation.
3. og:image — The Representative Image
The og:image property identifies the image associated with the shared webpage.
This image often has a major visual influence on how a link appears in a social feed or messaging interface. It should represent the page rather than an unrelated brand graphic or decorative image.
Example:
``html
<meta property="og:image" content="https://example.com/images/website-security-guide.jpg">
``
Use an absolute HTTPS URL that points to the actual image file. Replace the illustrative address with an image hosted on your own website or another appropriate public location.
Before publishing, check that:
- The image URL is correct and publicly accessible.
- The image represents the actual page content.
- The image is not blocked by access restrictions.
- The image is delivered in a format supported by the intended sharing platform.
- The image does not contain misleading or unrelated text.
Do not assume that every platform uses identical image dimensions, file-size limits, or cropping behavior. Those details depend on the platform and its current implementation.
4. og:url — The Object's Permanent URL
The og:url property identifies the object's permanent URL in the social graph.
Example:
``html
<meta property="og:url" content="https://example.com/website-security-guide/">
``
Use the intended public URL of the page, including its correct protocol, hostname, and path.
For example, if the intended destination is:
https://example.com/guides/website-security/
then the Open Graph declaration should identify that destination rather than an unrelated homepage, temporary preview URL, or tracking address.
This property is especially important when a website has multiple URL variations, such as URLs with tracking parameters or alternative paths.
An HTML canonical link and og:url have related identity purposes, but they are separate declarations. The HTML canonical element communicates a preferred URL to search engines, while og:url identifies the Open Graph object. For an ordinary page, aligning them to the same intended public URL is generally a sensible implementation choice. Do not assume that setting one automatically configures the other.
The four basic properties and their definitions are documented in the Open Graph metadata specification.
Optional Open Graph Meta Tags Worth Adding
The four required properties establish the basic object information. Several additional properties can make that information more useful.
og:description — A Short Description
The og:description property provides a one- or two-sentence description of the object.
Example:
``html
<meta property="og:description" content="Learn practical ways to protect your website, reduce common security risks, and maintain a safer online presence.">
``
A good description explains what someone will find after opening the shared link. It should be concise, accurate, and consistent with the actual page.
Unlike the four basic properties, og:description is optional in the protocol. Nevertheless, it is a useful addition when you want to provide a clear description instead of relying entirely on automatic extraction.
og:site_name — The Website Name
The og:site_name property identifies the overall website associated with the object.
Example:
``html
<meta property="og:site_name" content="Example Website">
``
This is different from og:title. The title identifies the particular page or object, while the site name identifies the broader website.
For example:
og:title: A Practical Guide to Website Securityog:site_name: Example Website
The property is optional, but it can provide useful context for compatible consumers.
og:image:alt — A Description of the Image
The og:image:alt property describes what the associated image depicts.
Example:
``html
<meta property="og:image:alt" content="A laptop displaying a website security dashboard beside a padlock symbol">
``
Describe the actual image rather than writing a generic marketing caption. If the image contains a specific subject, explain that subject clearly.
The Open Graph specification recommends supplying this property when og:image is specified.
Additional Image Properties
The protocol also supports structured image properties that provide more information about the selected image.
| Property | Purpose |
|---|---|
og:image:url | An alternative declaration equivalent to og:image. |
og:image:secure_url | An alternate secure URL for the image. |
og:image:type | The image's MIME type, such as image/jpeg. |
og:image:width | The image width in pixels. |
og:image:height | The image height in pixels. |
og:image:alt | A description of what the image depicts. |
For example:
``html
<meta property="og:image" content="https://example.com/images/security-guide.jpg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="A laptop displaying a website security dashboard">
``
The dimensions in this example are illustrative metadata values, not a universal platform requirement. Only declare dimensions that accurately describe the actual image file.
For further details, consult the official Open Graph structured properties documentation.
How to Add Open Graph Meta Tags to HTML
The simplest implementation is to add the required properties and useful optional properties to the document head.
Here is a complete illustrative example for a blog article.
```html <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>A Practical Guide to Website Security</title> <meta name="description" content="Learn practical ways to protect your website and reduce common security risks.">
<!-- Required Open Graph properties --> <meta property="og:title" content="A Practical Guide to Website Security"> <meta property="og:type" content="article"> <meta property="og:image" content="https://example.com/images/website-security-guide.jpg"> <meta property="og:url" content="https://example.com/guides/website-security/">
<!-- Optional Open Graph properties --> <meta property="og:description" content="Learn practical ways to protect your website, reduce common security risks, and maintain a safer online presence."> <meta property="og:site_name" content="Example Website"> <meta property="og:image:alt" content="A laptop displaying a website security dashboard beside a padlock symbol"> </head> <body> <h1>A Practical Guide to Website Security</h1> <p>Your article content goes here.</p> </body> </html> ```
This example follows the official property syntax. The domain, page title, description, and image are placeholders, not verified production assets. Replace them with information belonging to your actual webpage before deployment.
Implementation Decisions to Check
1. Put the tags in the document head.
Place Open Graph declarations between the opening and closing <head> tags. They should be part of the HTML document delivered to the sharing consumer.
2. Use accurate page-specific values.
Do not copy identical titles and descriptions across every page if those pages contain different information. Each page should describe its own content.
3. Select the correct object type.
Use article for an editorial article where appropriate and website for a general website object. Do not select a type merely because it appears in an example.
4. Use the intended public URL.
Check that og:url points to the intended destination. If the website has a canonical link element, review both declarations for consistency.
5. Confirm the image is available.
An image path that works only inside your website administration panel will not necessarily work for an external sharing consumer. Use a publicly accessible image URL.
6. Avoid conflicting duplicate properties.
Some properties can accept multiple values, including multiple og:image declarations. However, accidental duplicates can create confusing results. When multiple image values are intentional, arrange them deliberately. The specification gives preference to the first declared value when conflicting array values are present.
7. Keep descriptions truthful.
The title and description should accurately summarize the visible destination. Do not describe features, offers, or information that the page does not contain.
How to Check Whether Your Open Graph Tags Work
Adding the HTML declarations is only the first part of implementation. You also need to confirm that the delivered page contains the expected metadata and that the intended sharing service can retrieve it.
Use this practical validation process.
Step 1: Inspect the HTML Source
Open the public webpage and inspect its HTML source or rendered document head.
Look for the following properties:
``html
<meta property="og:title" content="...">
<meta property="og:type" content="...">
<meta property="og:image" content="...">
<meta property="og:url" content="...">
``
Check that the properties exist and their content values are correct.
If your website uses a content management system, a theme, or an SEO plugin, check the generated HTML rather than assuming that saving settings has produced the expected output.
Step 2: Check the Image URL
Copy the URL specified in og:image and open it directly in a browser.
Confirm that it loads without requiring a login, an administrative session, or special permissions. Check that it is the correct image and that its delivery is not blocked by access restrictions.
A valid-looking metadata declaration is not sufficient if the actual image cannot be retrieved.
Step 3: Compare the Object URL
Check the value of og:url against the intended public destination.
Review the page's HTML canonical declaration as well if one exists. If the two URLs differ, determine whether the difference is intentional rather than automatically changing either value.
Step 4: Examine the Social Preview
Use the sharing platform's available preview or diagnostic functionality to see how it interprets the webpage.
Different platforms may process metadata differently. A preview from one service does not establish that every other service will display identical information.
Check the actual title, image, description, and destination where those details are available.
Step 5: Recheck After Making Changes
If you update an Open Graph property but an existing preview continues to show old information, caching may be responsible.
Some sharing services retain previously retrieved page information. Where the platform provides a refresh or re-scrape option, use its documented process. Otherwise, allow time for the service to retrieve updated information.
Do not assume that changing the HTML immediately updates every previously generated preview.
Open Graph Basic Metadata Implementation and Validation Worksheet
Use this worksheet whenever you add Open Graph metadata to a new webpage or review an existing implementation.
Part A: Required and Optional Property Reference
| Property | Required by protocol? | What to provide |
|---|---|---|
og:title | Yes | The accurate title of the shared object. |
og:type | Yes | The appropriate object classification. |
og:image | Yes | The representative image URL. |
og:url | Yes | The permanent object URL. |
og:description | No | A concise description of the content. |
og:site_name | No | The name of the overall website. |
og:image:alt | Recommended when an image is supplied | An accurate description of the image. |
Part B: Implementation Checklist
- [ ] Add the Open Graph declarations inside the HTML document head.
- [ ] Confirm that all four required properties are present.
- [ ] Replace every example value with real page information.
- [ ] Select an object type that describes the actual page.
- [ ] Check that the image URL is publicly accessible.
- [ ] Add a concise and accurate description.
- [ ] Provide the overall website name where useful.
- [ ] Add meaningful image alternative-description metadata.
- [ ] Review
og:urlagainst the intended public destination. - [ ] Check for accidental duplicate or conflicting declarations.
- [ ] Inspect the delivered HTML and a relevant sharing preview.
Part C: Troubleshooting Matrix
| Problem | What to inspect | Recommended action |
|---|---|---|
| Wrong title | og:title and delivered HTML | Correct the declared page title. |
| Missing image | og:image and image accessibility | Correct the image URL and check its availability. |
| Wrong destination | og:url and intended page URL | Align the object URL with the intended destination. |
| Old preview | Previously cached platform information | Request a fresh scrape where supported. |
| Missing description | og:description | Add a concise and accurate optional description. |
| Incorrect object classification | og:type | Choose the type that matches the actual content. |
| Conflicting preview details | Duplicate or multiple metadata declarations | Review property order and remove unintended conflicts. |
This worksheet is a practical implementation reference based on the published protocol. It is not a claim of an independent platform experiment or a guarantee of identical results across services.
Open Graph Tags vs. SEO Meta Tags
Open Graph metadata and conventional SEO metadata are related to webpage presentation, but they serve different purposes.
The distinction matters because adding social-sharing properties does not replace the metadata and technical signals that search engines use for their own processing.
| Metadata or directive | Main purpose | Example |
|---|---|---|
| Open Graph | Describes a webpage for compatible social-sharing consumers. | og:title, og:image |
| Search description metadata | Provides a description that Google may use when generating search snippets. | meta name="description" |
| Title element | Supplies the webpage's HTML title and can inform search title links. | <title>Page Title</title> |
| Robots directives | Communicate crawler and indexing preferences. | meta name="robots" |
| Canonical link | Identifies a preferred URL among duplicate or similar pages. | <link rel="canonical" href="..."> |
Google's documentation lists the metadata and attributes that Google Search supports, including description and robots-related information. Unsupported metadata is not automatically treated as a Google Search instruction.
There is one important qualification: Google's title-link documentation lists og:title among several possible sources for automatically generated search-result title links. Google may also use the HTML title element, prominent page text, and other sources.
That limited connection does not mean that all Open Graph properties affect Google rankings. It also does not mean that Open Graph metadata controls whether a page is indexed.
For a broader explanation of crawling, indexing, canonicalization, and other technical website checks, see our guide to broader technical SEO considerations.
If you need to investigate whether a webpage appears in Google's index, that is a separate task from checking its social-sharing preview. The IndexNowFast Google Index Checker provides a separate workflow for reviewing observed Google index status.
Keeping these jobs separate helps prevent a common implementation mistake: treating social metadata as an indexing or ranking control.
Frequently Asked Questions
What are the four required Open Graph meta tags?
The four basic required Open Graph properties are og:title, og:type, og:image, and og:url. They identify the shared object's title, type, representative image, and permanent URL.
Is og:description required?
No. The official Open Graph specification classifies og:description as optional. It is still useful because it provides a concise description of the content for compatible sharing consumers.
Where should Open Graph tags go in HTML?
Place them inside the HTML document's <head> element. They use <meta> elements with a property attribute and a corresponding content value.
Is Open Graph the same as SEO metadata?
No. Open Graph primarily describes webpages for compatible social-sharing consumers. Search metadata and robots directives serve separate search-engine purposes. Some information, such as og:title, may also be considered by Google when generating title links, but the systems are not interchangeable.
Does adding Open Graph metadata improve Google rankings?
There is no basis for promising a ranking improvement from adding the four Open Graph properties. Google documents og:title as one possible source for generating title links, but that is not evidence that all Open Graph fields are ranking factors.
Can I use the same Open Graph image on every page?
You can technically declare the same image for multiple pages, but a page-specific representative image is generally more informative. Choose an image that accurately represents the content being shared.
Why is my social-sharing preview showing an old title or image?
The sharing service may be using previously cached page information. First inspect the current HTML and confirm that the metadata and image URL are correct. Then use the platform's documented refresh or re-scrape functionality if available.
Can a webpage have multiple og:image properties?
Yes. The Open Graph protocol supports multiple values for array properties, including images. However, the order matters: the first declared value receives preference when conflicting values are present. Add multiple images intentionally rather than creating accidental duplicates.
Should og:url match the HTML canonical URL?
For an ordinary webpage, using the same intended public URL for both is generally a sensible approach. However, og:url and the HTML canonical element are different declarations with different roles. Review them together instead of assuming that one automatically replaces the other.
Final Implementation Advice
The best starting point for the open graph protocol basic meta tags is a correct implementation of the four required properties. Give every page an accurate title, an appropriate object type, a representative public image, and the intended permanent URL.
Then add useful optional information, especially og:description, og:site_name, and og:image:alt. Inspect the HTML delivered to visitors, verify that the image can be retrieved, and review the actual sharing preview on the platform that matters to your audience.
Most importantly, keep social-sharing metadata separate from search indexing and ranking controls. Open Graph helps compatible services understand how to present a shared webpage; it does not guarantee a particular preview, Google indexing, or higher search rankings.