NeovaNền tảng SEO chuyên sâu

Meta description bị JavaScript thay đổi

Trong Neova Chạy khi lần crawl render trang bằng Chrome, một thiết lập do bạn bật.

Quy tắc được rà soát lần cuối ngày 17 tháng 10 năm 2026 · Hướng dẫn cập nhật ngày 7 tháng 7 năm 2026

Các crawler không chạy JavaScript đọc một meta description khác với meta description trong HTML đã kết xuất.

Bạn có thể làm gì

Xuất meta description cuối cùng trong HTML từ server và ngăn JavaScript viết lại nó.

Vì sao Neova đánh dấu

  • Crawler không chạy JavaScript đọc description khác với description Google thấy sau khi render.
  • Hai phiên bản khiến không rõ công cụ tìm kiếm và công cụ AI sẽ hiện hoặc trích dẫn đoạn nào.
  • Google dùng meta description cho snippet khi nó mô tả trang tốt hơn văn bản trang.

Nguồn

Hướng dẫn đầy đủ

Phần này tạm thời còn bằng tiếng Anh.

What "Meta Description Updated by JavaScript" Means

This check fires when your page ships a perfectly good <meta name="description"> in the raw HTML, and then JavaScript runs and replaces its content with something different. The stakes: crawlers that read source get one description, crawlers that render get another, and you no longer control which version any given consumer indexes or shows.

Draw the line clearly against the sibling check. Here a description is present in source and gets overwritten. In Meta Description Only in Rendered HTML, there's no description in source at all and JS creates one from scratch. This page is about a conflict between two values, not a missing tag.

A Real Example of the Overwrite

The server sends this — a clean, hand-written description:

<!-- Raw HTML from the server -->
<meta name="description"
  content="Hand-forged chef knives, balanced for daily use.
  Lifetime sharpening included.">

Then a router or analytics/personalization script mutates it after load:

<!-- app.js, running client-side -->
document.querySelector('meta[name="description"]')
  .setAttribute('content', 'Home | Acme');

Now the rendered DOM carries a useless generic string, and the good copy is gone:

<!-- Rendered DOM, after JS -->
<meta name="description" content="Home | Acme">

The fix is to stop the client-side mutation and let the server-rendered value stand — or, if the value legitimately must be per-route, generate the correct one server-side per route so source and render agree:

<!-- Corrected: one authoritative value, set server-side, not mutated -->
<meta name="description"
  content="Hand-forged chef knives, balanced for daily use.
  Lifetime sharpening included.">
<!-- no client-side setAttribute on this tag -->

Common Overwrite Culprits and How to Stop Them

Culprit What It Does How to Stop It
Client-side router (React Helmet, Vue Meta, etc.) Re-sets head tags on hydration, sometimes to a stale or default value Render the same head server-side so the hydrated value matches source; fix the default
Hydration mismatch Server prints description A, client component computes description B, client wins Make the client compute the identical value; sync the data source both sides use
Tag manager / personalization script An A/B or personalization tool rewrites meta on the fly Exclude meta tags from the tool's DOM edits; personalize body content instead
Plugin conflict Two SEO plugins each write a description; the later-loading one overwrites Disable one; keep a single source of truth for meta output
SPA leftover default A global <meta> in the app shell overrides per-page values on navigation Remove the shell default; set description per route only

How to Detect It on Your Own Site

  1. Diff source against rendered: compare curl -s https://yourpage/ | grep -i description with the value shown in devtools → Elements. Two different strings is the smoking gun.
  2. View Rendered Source extension: it flags nodes JavaScript changed (not just added). A mutated description shows as a modified node.
  3. GSC URL Inspection: View crawled page shows what Google rendered; if that differs from your view-source description, JS is winning at render time.
  4. Devtools breakpoint: in Sources, set a DOM attribute modified breakpoint on the description meta node, reload, and the debugger stops on the exact script doing the overwrite.
  5. Screaming Frog, two passes: crawl in text mode and JS-rendered mode; a description that differs between the two runs is being rewritten client-side.

How to Fix It

  1. Identify the script mutating the tag using the DOM attribute-modified breakpoint above.
  2. Decide the single authoritative description for the route and set it server-side (SSR/SSG), so source is already correct.
  3. Make the client-side head logic compute the same value, or remove it entirely so nothing overwrites the server value.
  4. If a tag manager or personalization tool is the culprit, scope it away from the <head>.
  5. Re-diff source vs. rendered until both show one identical description, then re-crawl to clear the flag.

Why this is worse than it looks: Google may index the rendered value, Bing and AI crawlers may keep the source value, and your social previews may show a third thing. A silent overwrite turns one description into a lottery. Pin it to one value and the ambiguity disappears.

FAQ

Which Description Does Google Actually Use?

Google typically indexes what it sees after rendering, so a JS overwrite means the mutated value tends to win with Google — while source-only readers keep the original. That split is exactly the problem.

Is It Ever Fine for JS to Set the Description?

It's fine if the client value is identical to the server value — common with SSR frameworks that re-apply the same head on hydration. The check only bites when the two values disagree.

How Do I Find the Exact Script Doing It?

Set a DOM "attribute modified" breakpoint on the description meta element in Chrome devtools, reload, and the debugger halts on the offending line. That beats grepping through bundles.

How Is This Different From the Rendered-HTML-Only Check?

Overwrite means source has a description and JS changes it. Rendered-only means source has no description and JS adds it. Same neighborhood, opposite root cause — see Meta Description Only in Rendered HTML.

Could a Plugin Conflict Cause This on WordPress?

Yes. Running two SEO plugins that both emit a description, or a theme that hard-codes one, produces exactly this overwrite. Keep a single plugin authoritative for meta output.

Related reading: Rendering JavaScript for SEO: What Google Indexes, Hydration, and Title Tags and Meta Descriptions: The Complete Guide.

Tìm lỗi này trên trang của bạn

Neova chạy mục kiểm tra này và mọi mục khác trong mỗi lần crawl, rồi viết cách sửa thành ticket cho nhóm của bạn.

  • Ứng dụng máy tính cho Mac, Windows và Linux
  • Tất cả 696 mục kiểm tra, mỗi mục kèm nguồn
  • Search Console và Analytics 4, kết nối chỉ đọc
  • Ticket sang Jira, Linear và Asana

Tải Neova Gói Desktop Free, hoặc dùng thử Solo miễn phí 14 ngày, không cần thẻ.

Tất cả mục kiểm tra Khả năng lập chỉ mục · Hướng dẫn · Thư viện mục kiểm tra

Do Neova Labs biên soạn · Quay lại Thư viện mục kiểm tra