og:url Example
Put it inside the <head> of the page:
<meta property="og:url" content="https://example.com/blog/fix-blurry-link-preview" />Where og:url Shows Up
- Apps show the domain from it under or above the title.
- Facebook adds up likes and shares for every variant of the link under this one URL.
- Facebook's crawler follows it. If
og:urlis a different page, Facebook fetches that page and uses its tags instead.
Rules for og:url
- Use the full address with
https://. - Leave out tracking parameters, session IDs and anything else that changes per visitor.
- Make it match your
<link rel="canonical">tag. - Pick www or non-www, and a trailing slash or none, and use the same form everywhere.
Common og:url Mistakes
- The homepage URL on every page. Every share then shows the homepage's title and image.
- A staging or localhost address left over from development.
- http:// on a site that redirects to https://. The crawler has to follow a redirect it didn't need.
- A URL that redirects back to the page it came from. Facebook reports a circular redirect and gives up.
See the full Open Graph tags list for the tags that go with it.
Frequently Asked Questions
Is og:url required?
The spec lists it as one of four required tags. A preview still appears without it, because apps fall back to the address they fetched, but share counts can split across URL variants.
Should og:url match the canonical URL?
Yes. Both say which address is the real one for this page. If they disagree, search engines and social crawlers end up treating different URLs as the original.
Why does Facebook show my homepage when I share another page?
Check that page's og:url. If it's set to the homepage, Facebook follows it and reads the homepage's tags. Set og:url to the page's own address and scrape it again in the Sharing Debugger.