WebSeoHK - 網路知識庫 - 2025-12-17

Meta 標籤、結構化資料與爬蟲指示(robots.txt、noindex)的正確使用

Meta 標籤、結構化資料與爬蟲指示的正確使用

Meta 標籤用於 HTML <head> 區段,提供網頁資訊給搜尋引擎、瀏覽器與社群平台;結構化資料增強搜尋結果呈現;爬蟲指示則控制搜尋引擎行為,如 robots.txt 與 noindex。

1. Meta 標籤的核心類型與優化原則

Meta 標籤幫助搜尋引擎理解網頁內容,提升 SEO 排名與點擊率。主要類型包括:

Meta 標籤名稱 作用 優化建議與範例語法
Title 網頁標題,顯示於搜尋結果與瀏覽器分頁 長度 27 個中文字內,前置關鍵字、結尾品牌名、使用數字/年份。<title>2024 SEO Meta 標籤優化技巧 - 米好行銷</title>
Description 內容摘要,吸引點擊 120-180 個中文字內,自然置入 1-2 個關鍵字、使用行動呼籲,避免堆疊。<meta name="description" content="教你優化 Meta Title 與 Description,提升 Google 排名。">
Robots 控制索引與追蹤 noindex, nofollow 阻止索引與連結追蹤;noarchive 禁快取;nosnippet 禁摘要。<meta name="robots" content="noindex, nofollow">
Viewport 行動裝置適配 <meta name="viewport" content="width=device-width, initial-scale=1">
Charset 字元編碼 <meta charset="UTF-8">
Canonical 指定正規網址,避免重複內容 <link rel="canonical" href="https://example.com/page.html">
Hreflang 多語系設定 指定語言變體

注意:Title 與 Description 對排名影響最大,需與內容高度相關,避免重複或過長(會被截斷)。

2. 結構化資料(Structured Data)的使用

結構化資料使用 JSON-LD、Microdata 或 RDFa 格式,讓搜尋引擎顯示豐富結果(如星級、FAQ)。搜尋結果未詳盡說明,但常見於 Open Graph (OG) 標籤,適用社群分享與 SEO:

  • OG 標籤範例(置於 <head>):
    <meta property="og:title" content="文章標題">
    <meta property="og:description" content="簡短說明">
    <meta property="og:image" content="https://example.com/image.webp">
    <meta property="og:url" content="https://example.com/page.html">
    <meta property="og:type" content="article">
    <meta property="og:site_name" content="網站名稱">
    
    使用正規網址 (canonical URL),類型如 articlewebsite

其他如 Schema.org 標記(e.g., FAQPage),可提升點擊率,但需驗證工具確認正確性。

3. 爬蟲指示:robots.txt 與 noindex

  • robots.txt:網站根目錄檔案,控制爬蟲存取路徑。全站級指令。

    User-agent: *
    Disallow: /private/
    Allow: /
    Sitemap: https://example.com/sitemap.xml
    

    禁止特定資料夾(如管理頁),但無法保證 100% 阻擋(僅建議性)。

  • noindex:頁面級控制,優先於 robots.txt。

    • Meta Robots:<meta name="robots" content="noindex"> 阻止索引。
    • HTTP 標頭:X-Robots-Tag: noindex(伺服器端)。

優先順序:noindex > robots.txt。預設為 index, follow。用於隱私頁面、測試頁,避免浪費爬取預算。

實務建議

  • 放置位置:全置 <head> 內,早於其他腳本。
  • 常見錯誤:關鍵字堆疊、忽略行動適配、重複 Title。
  • 測試工具:Google Search Console 驗證 Meta 與結構化資料;robots.txt Tester 檢查爬蟲規則。

正確使用可提升排名 20-30% 點擊率,視內容品質而定。

網路圖片

WebSeoHK 為香港、澳門和內地提供業界最優質的網站流量服務。我們為客戶提供多種流量服務,包括網站流量、桌面流量、行動流量、Google流量、搜索流量,電商流量、YouTube流量、TikTok流量。我們的網站擁有 100% 的客戶滿意度,因此您可以放心地在線購買大量 SEO 流量。每月僅需 90 港幣即可立即增加網站流量、提高 SEO 效能並增加銷售額!

您在選擇流量套餐時遇到困難嗎?聯繫我們,我們的工作人員將協助您。

免費諮詢

免費諮詢 客服支援

挑選方案需要幫助嗎?請填寫右側表單,我們將回覆您!

Fill the
form