Có 5 meta tags quan trọng nhất mà frontend dev cần nắm: title, description, robots, canonical, và Open Graph.
Title tag (<title>): quan trọng nhất, hiển thị trên tab browser và kết quả tìm kiếm. Quy tắc: 50-60 ký tự, chứa keyword chính ở đầu, unique cho mỗi trang, format: 'Primary Keyword - Secondary | Brand'.
Meta description (<meta name='description'>): mô tả trang hiển thị dưới title trên Google. Quy tắc: 150-160 ký tự, chứa keyword tự nhiên, có call-to-action, unique.
Meta robots (<meta name='robots'>): điều khiển indexing — index,follow (mặc định), noindex (không index), nofollow (không follow links).
Canonical (<link rel='canonical'>): chỉ định URL chính thức khi có duplicate content.
Open Graph (og:title, og:description, og:image): kiểm soát preview khi share trên social media.
The 5 most important meta tags for frontend developers: title, description, robots, canonical, and Open Graph.
Title tag (<title>): the most important tag, displayed on browser tabs and search results. Rules: 50-60 characters, primary keyword near the start, unique per page, format: 'Primary Keyword - Secondary | Brand'.
Meta description (<meta name='description'>): page description shown beneath the title on Google. Rules: 150-160 characters, include keywords naturally, include a call-to-action, unique per page.
Meta robots (<meta name='robots'>): controls indexing — index,follow (default), noindex (exclude from index), nofollow (do not follow links).
Canonical (<link rel='canonical'>): specifies the authoritative URL when duplicate content exists.
Open Graph (og:title, og:description, og:image): controls how content appears when shared on social media.