网站SEO较深度层面都会进行头部协议的优化,用意是建立网站和外部平台的互通互链,通过meta和link标签协议让搜索引擎和社交媒体网站能准确知晓我们网站的服务项目、内容领域、作者是谁等等,让全网用户能直观的查觉到我们的信息。
而我们常用的og网络协议和头部其他协议都需用到meta标签,如果你的网站需要对国外开发内容,可以参考以下加入的meta和link标签:
<meta name="author" content="作者名稱">
<meta name="copyright" content="版權所有人名稱">
<link rel="author" href="google plus 個人頁網址/posts">
<link rel="publisher" href="google plus 個人頁網址">
<meta name="description" content="網頁描述">
<meta itemprop="name" content="網站名稱或標題">
<meta itemprop="image" content="要顯示的縮圖網址">
<meta itemprop="description" content="網頁描述">
<meta property="og:title" content="網站名稱或標題" >
<meta property="og:url" content="網址">
<meta property="og:image" content="要顯示的縮圖網址">
<meta property="og:description" content="網頁描述" >
其中以下这三行,是写给搜寻引擎看的(特别是google ),当中最重要的,就是rel="author"这一句,有写这一段,接下来我们就可以去去google plus进行互相认证的作业(也就是要让google plus确认这个网页的作者是你)
<link rel="author" href="google plus 個人頁網址/posts">
<link rel="publisher" href="google plus 個人頁網址">
<meta name="description" content="網頁描述">
而认证的过程,可以点选google结构化资料测试工具连结,进行相关的认证作业,认证的过程其实也很简单,就是进入google plus的个人页面,点选「帐户」,点选「编辑个人资料」,接着将「连结」里头的「作品刊载于」,新增目前的网站,接着google plus就会去查询你的网站是否有放上rel=“author”,如果有,就完成啰!
而这三行是写给google plus 看的,分享到google plus 上头,就会正确显示
<meta itemprop="name" content="網站名稱或標題">
<meta itemprop="image" content="要顯示的縮圖網址">
<meta itemprop="description" content="網頁描述">
而这四行是写给facebook看的,分享到facebook上头,就会正确显示,如果发现都已经照着设定了,分享时仍有问题,可以点选Facebook Debugger进行查询和重新设定,完成后再次分享应该就不会有问题啰!
<meta property="og:title" content="網站名稱或標題" >
<meta property="og:url" content="網址">
<meta property="og:image" content="要顯示的縮圖網址">
<meta property="og:description" content="網頁描述" >
当然meta 标签绝对不止这一些,因为除了facebook 和google plus,还有一个世界前三大的社群平台twitter,以下列出在这些平台上完整的meta 标签语法,如果有需要也可以都加进自己的网站喔!
<!-- Update your html tag to include the itemscope and itemtype attributes. -->
<html itemscope itemtype="http://schema.org/Article">
<!-- Place this data between the <head> tags of your website -->
<title>Page Title. Maximum length 60-70 characters</title>
<meta name="description" content="Page description. No longer than 155 characters." />
<!-- Google Authorship and Publisher Markup -->
<link rel="author" href=" https://plus.google.com/[Google+_Profile]/posts"/>
<link rel="publisher" href=” https://plus.google.com/[Google+_Page_Profile]"/>
<!-- Schema.org markup for Google+ -->
<meta itemprop="name" content="The Name or Title Here">
<meta itemprop="description" content="This is the page description">
<meta itemprop="image" content=" http://www.example.com/image.jpg">
<!-- Twitter Card data -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@publisher_handle">
<meta name="twitter:title" content="Page Title">
<meta name="twitter:description" content="Page description less than 200 characters">
<meta name="twitter:creator" content="@author_handle">
<!-- Twitter summary card with large image must be at least 280x150px -->
<meta name="twitter:image:src" content=" http://www.example.com/image.html">
<!-- Open Graph data -->
<meta property="og:title" content="Title Here" />
<meta property="og:type" content="article" />
<meta property="og:url" content=" http://www.example.com/" />
<meta property="og:image" content=" http://example.com/image.jpg" />
<meta property="og:description" content="Description Here" />
<meta property="og:site_name" content="Site Name, i.e. Moz" />
<meta property="article:published_time" content="2013-09-17T05:59:00+01:00" />
<meta property="article:modified_time" content="2013-09-16T19:08:47+01:00" />
<meta property="article:section" content="Article Section" />
<meta property="article:tag" content="Article Tag" />
<meta property="fb:admins" content="Facebook numberic ID" />
国内搜索引擎大多数都支持以上协议,建议你的网站最少用上og网络协议,以360搜索智能摘要为例,采用的就是og网络协议。