问题原文
原帖链接 · k1k · CC BY-SA 4.0
My pages already have good html meta tags like title and description for Google SEO. I also added og:title, og:description, twitter:title, twitter:description and other meta tags, but I found in most cases og:title/twitter:title are the same as title, and description is also very redundant. So, can I omit some redundant meta tags for smaller page size, and not expect any negative impact?
<title>short title here</title>
<meta name="description" content="long description" />
<!-- section of og:... meta headers -->
<meta property="og:title" content="short title here" />
<meta property="og:description" content="long description" />
<meta property="og:image" content="..." />
<!-- section of twitter:... meta headers -->
<meta property="twitter:title" content="short title here" />
<meta property="twitter:description" content="long description" />
The og:url tag (for Facebook) also looks redundant to <link rel="canonical" href="..." > (for Google).
Can I omit the redundant ones, and keep only the unique ones not provided by another group, like this twitter card?
<meta name="twitter:card" content="summary_large_image" />
So, will facebook/twitter default to using the page's title/description tags when og:title/og:description are missing? And not penalize the content?
社区高分解答
原帖链接 · Maximillian Laumeister · CC BY-SA 4.0
Twitter-specific Tags
The twitter-specific title and description meta tags are redundant if they are identical to your og tags, so you can leave them out.
If you omit twitter:title, Twitter will fallback to your og:title tag.
If you omit twitter:description, Twitter will fallback to your og:description tag.
If you don't include an og:type tag then you will want to include a twitter:card type. But if you do include og:type, then even twitter:card "may" not be needed, though personally I would still include it just to be sure. According to the twitter card markup docs:
If an og:type, og:title and og:description exist in the markup but twitter:card is absent, then a summary card may be rendered.
In any case, the best way to check the validity of your card is to use Twitter's Card Validator tool. Then you can be sure that your tags are set up properly to show cards.
Title and Description Tags
I am not certain whether Twitter or Facebook fall back to the title and description tags if og:title, twitter:title, og:description or twitter:description are not present, but I couldn't find any indication in their documentation that they do. Someone would have to test this on a live website with the Twitter Card Validator and Facebook Sharing Debugger.
Rel canonical and og:url tags
I found no evidence in Facebook's documentation that they pay attention to rel canonical, so I recommend you continue to use both rel canonical and og:url.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
