',\n '',\n '',\n ]\n .filter(Boolean)\n .join('\\n');\n}\n```\n\n```javascript\nconst routes = {\n '/': {\n html: page({\n title: 'Acme Shoes: 适合每位跑者的跑步鞋',\n description: '适用于道路和山径的轻便跑步鞋,提供免费退换货服务。',\n canonical: '/',\n body: [\n '

Acme Shoes

',\n 'Blue Runner',\n '夏季促销',\n ].join('\\n'),\n }),\n },\n // 问题:标题模糊且缺少元描述\n '/products/blue-runner': {\n html: page({\n title: 'Acme Shoes',\n canonical: '/products/blue-runner',\n body: '

Blue Runner

',\n }),\n },\n // 问题:缺失的产品页面仍返回\"200 OK\"状态码(软404)\n '/products/red-runner': {\n html: page({\n title: 'Acme Shoes',\n body: '

抱歉,未找到该产品。

',\n }),\n },\n // 问题:存在重定向链,/old-sale -> /sale-2025 -> /sale\n '/old-sale': { redirect: '/sale-2025' },\n '/sale-2025': { redirect: '/sale' },\n '/sale': {\n html: page({\n title: '夏季促销:跑步鞋最高优惠40% | Acme Shoes',\n description: \"最高优惠40%购买上季跑步鞋,截止8月31日。\",\n canonical: '/sale',\n body: '

夏季促销

',\n }),\n },\n // 问题:页面本身无法看到的noindex头部\n '/about': {\n headers: { 'X-Robots-Tag': 'noindex' },\n html: page({\n title: '关于Acme Shoes',\n description: '了解这个两人工作室如何发展成为跑步鞋品牌。',\n canonical: '/about',\n body: '

关于我们

',\n }),\n },\n // 问题:规范URL标签指向首页\n '/blog/choosing-trail-shoes': {\n html: page({\n title: '如何选择山地跑步鞋 | Acme Shoes',\n description: '抓地力、落差和贴合度:选择山地跑步鞋时需要关注的关键要素。',\n canonical: '/',\n body: '

如何选择山地跑步鞋

',\n }),\n },\n // 问题:内容需要JavaScript执行后才会加载\n '/catalog': {\n html: page({\n title: '所有跑步鞋 | Acme Shoes',\n description: '浏览所有Acme跑步鞋产品。',\n canonical: '/catalog',\n body: '
加载中...
',\n script:\n \"fetch('/api/products').then((r) => r.json()).then((products) => {\" +\n \"document.getElementById('app').innerHTML = products.map((p) => '

' + p + '

').join('');\" +\n '});',\n }),\n },\n '/api/products': {\n type: 'application/json',\n html: JSON.stringify(['Blue Runner', 'Trail Grip 2', 'City Glide']),\n },\n // 问题:robots.txt中的\"Disallow: /blog\"会阻止所有以/blog开头的路径\n '/robots.txt': {\n type: 'text/plain',\n html: 'User-agent: *\\nDisallow: /blog\\n',\n },\n};\n\nhttp\n .createServer((req, res) => {\n const path = new URL(req.url, BASE).pathname;\n const route = routes[path];\n\n if (!route) {\n res.writeHead(404, { 'Content-Type': 'text/html; charset=utf-8' });\n return res.end(page({ title: '页面未找到', body: '

页面未找到

' }));\n }\n if (route.redirect) {\n res.writeHead(301, { Location: route.redirect });\n return res.end();\n }\n res.writeHead(200, {\n 'Content-Type': (route.type || 'text/html') + '; charset=utf-8',\n ...route.headers,\n });\n res.end(route.html);\n })\n .listen(PORT, () => console.log('练习站点运行在 ' + BASE));\n```\n\n每个 `routes` 键对应一个页面地址。以 Problem: 开头的注释说明了每个页面存在的问题。\n\n从同一文件夹启动服务器:\n\n```\nnode server.js\n```\n\n你应该看到:\n\n```\nPractice site running at http://localhost:8080\n```\n\n保持服务器运行,然后打开第二个终端执行以下命令。当你修改 server.js 时,用 Ctrl+C 停止服务器并重新启动。\n\n## 如何检查页面的 HTTP 状态码\n\n我记得刚开始构建网站时,做过各种各样的小项目。作为全栈开发者,我一直在尝试各种实验。\n\n有一次服务器端出现故障,我在 Network 标签页看到返回了 500 错误。另一次我故意删除了某个页面,想看看是否会触发 404 或其他问题。如果你在构建网站时多做尝试,会从结果中学到很多。\n\nHTTP 状态码是搜索引擎读取的第一项信息。它们是服务器与客户端(如你的浏览器)通信的方式。状态码分为五个区间:1xx、2xx、3xx、4xx 和 5xx。例如 5xx 状态码表示服务器问题,4xx 状态码表示客户端问题。\n\n404 是最常见的错误。它表示站点上找不到该页面。你经常会看到 404 错误,通常只需维护好网站和链接即可解决。\n\n本教程中你会看到以下状态码:\n\n- 200 OK:页面已找到\n- 301 Moved Permanently:页面已永久迁移至新地址\n- 404 Not Found:此处无页面\n\n根据 Google 的 HTTP 状态码文档,Google 不会对返回 4xx 状态码的 URL 进行索引。\n\n要查看练习网站首页的状态码,使用 -I 参数(仅显示头部信息)和 -s 参数(隐藏 curl 进度条):\n\n```\ncurl -sI http://localhost:8080/\n```\n\n```\nHTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n现在请求一个不在路由表中的地址,看看正确的 404 错误是什么样子:\n\n```\ncurl -sI http://localhost:8080/products/does-not-exist\n```\n\n```\nHTTP/1.1 404 Not Found\nContent-Type: text/html; charset=utf-8\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n在浏览器中打开开发者工具(F12 或 Mac 上的 Cmd+Option+I),进入 Network 标签页并刷新页面。状态列会显示状态码。\n\n### 什么是软 404?\n\n检查一个商店已停止销售的商品:\n\n```\ncurl -sI http://localhost:8080/products/red-runner\n```\n\n在浏览器中,同一页面会显示\"抱歉,未找到该商品\"。\n\n软 404 本质上是\"页面未找到\",但服务器仍返回 200 状态码。这会误导 Google,因为网址仍然存在,但内容已不再更新。\n\n要解决这个问题,应让缺失页面返回真正的 404 状态码,这正是 Google 推荐的做法。在练习网站中,从路由表中删除 '/products/red-runner' 条目。服务器随后会返回 404 状态码。\n\n破损链接会导致相同的结果。根据数据,被爬取的 53 个网站中有 18.9% 至少包含一个指向返回 404 的页面的链接。\n\n因此不要留下指向不存在内容的链接。应将其更新为指向相似内容或确实存在的页面。\n\n如果页面已迁移,应从旧地址添加 301 重定向到新地址。只有当页面确实不存在时,404 才是正确的响应。\n\n重定向基本上是指当你希望将一个 URL(可能是一个已不存在的 URL)发送到另一个 URL(存在的 URL)时的操作。例如,如果你将域名从 example-x.com 更改为 example-y.com,你可能会设置重定向,让所有输入 example-x.com 的用户自动跳转到 example-y.com。\n\n重定向本身是合理的,如果使用得当,它们可以非常有用。301 表示页面已永久移动,302 表示移动是临时的。Google 关于重定向的文档解释了它对每种状态的处理方式,其爬虫会跟踪最多 10 次重定向跳转。\n\n但当旧地址(例如过去使用过的域名)重定向到新地址后,新地址又继续重定向,形成链式结构时,问题就出现了。少量重定向影响不大,但五次、六次甚至七次重定向则可能造成显著问题。\n\n下面的第一个命令会显示链中的每一步,第二个命令会给出一行摘要。\n\n添加 -L 参数让 curl 跟随重定向:\n\n```\ncurl -sIL http://localhost:8080/old-sale\n```\n\n```\nHTTP/1.1 301 Moved Permanently\nLocation: /sale-2025\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n\nHTTP/1.1 301 Moved Permanently\nLocation: /sale\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n\nHTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n/old-sale 会跳转到 /sale-2025,再跳转到 /sale。要获取一行摘要:\n\n```\ncurl -sL -o /dev/null -w \"%{num_redirects} redirects, ended at %{url_effective}\\n\" http://localhost:8080/old-sale\n```\n\n```\n2 redirects, ended at http://localhost:8080/sale\n```\n\n-o /dev/null 告诉 curl 将页面的 HTML 内容丢弃,避免填充终端,只输出摘要信息。-w 参数用于设置摘要内容的格式。\n\n要修复这个问题,应直接将旧地址指向最终页面:\n\n```\n'/old-sale': { redirect: '/sale' },\n```\n\n重启服务器并再次运行摘要命令。现在显示为 1 次重定向,最终到达 http://localhost:8080/sale。\n\n## 如何确保 robots.txt 没有阻止重要页面\n\nrobots.txt 是网站告知搜索引擎(如 Google 及其爬虫)哪些内容可以访问、哪些不能访问的方式。\n\n查看实践站点的文件:\n\n```\ncurl -s http://localhost:8080/robots.txt\n```\n\n```\nUser-agent: *\nDisallow: /blog\n```\n\nDisallow: /blog 是危险的,因为它阻止爬虫访问所有以 /blog 开头的路径。而通常,你的文章内容是推动网站流量的主要因素。\n\nGoogle 的 robots.txt 文档提供了类似的示例:Disallow: /fish 也会阻止 /fish.html 和 /fishheads。\n\n要修复这个问题,应仅阻止你本意要阻止的内容,例如草稿文件夹:\n\n```\nUser-agent: *\nDisallow: /blog-drafts/\n```\n\n在实践站点中,修改 '/robots.txt' 条目的 html 行:\n\n```\nhtml: 'User-agent: *\\nDisallow: /blog-drafts/\\n',\n```\n\nrobots.txt 控制的是爬虫抓取行为,而非索引。Google 表示这不是阻止页面出现在 Google 中的机制。若要实现此目的,需要使用 noindex。\n\n即使某个 URL 被 robots.txt 阻止,它仍可能出现在搜索结果中(通常没有描述),如果其他页面链接到它。Google 只是永远不会读取该页面的内容。\n\n## 如何发现意外的 noindex\n\nnoindex 告诉 Google 不要索引特定页面。当它出现在您希望被索引和排名的页面(如产品页面或首页)时会产生负面影响。\n\n但在您不希望被排名的页面,或对网站贡献较小的页面(如登录、注册页面)上,它可以发挥积极作用。\n\n只有当爬虫能够访问页面并读取规则时,noindex 才会生效。如果 robots.txt 阻止了相同 URL,Google 将永远看不到 noindex,页面仍可能出现在搜索结果中。因此,若希望某页面不在 Google 中显示,请使用 noindex 并确保页面可被爬虫访问。\n\n在数据中,457 个审计页面中有 11 个(2.4%)包含 noindex robots 元标签。设置该标签有两种方式,需要检查两者。\n\n### 如何检查 Robots 元标签\n\n第一种方式是页面 中的标签:\n\n```\n\n```\n\n在页面中搜索该词:\n\n```\ncurl -s http://localhost:8080/about | grep -i noindex\n```\n\n在关于页面中,这会输出空内容。您也可以右键点击页面,选择“查看页面源代码”,然后搜索 noindex。\n\n修复 noindex 非常简单。您只需将其删除,搜索引擎即可索引页面。\n\n在页面代码或模板中查找该标签,并检查 CMS 或 SEO 插件设置。在 WordPress 中,“Discourage search engines from indexing this site” 设置会将该标签添加到每个页面。\n\n### 如何检查 X-Robots-Tag 请求头\n\n第二种方式是 HTTP 请求头。检查关于页面的请求头:\n\n```\ncurl -sI http://localhost:8080/about\n```\n\n```\nHTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nX-Robots-Tag: noindex\nDate: Sun, 25 Oct 2026 17:42:59 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n该请求头不会出现在“查看页面源代码”中,只会出现在响应头中。在数据中,12 个被阻止页面中有 5 个 HTML 中没有 noindex:其中 2 个有此请求头,3 个被 robots.txt 阻止爬取。\n\n在实践站点中修复此问题,需从 '/about' 条目中删除请求头行。在真实站点中,需检查服务器配置、托管提供商的请求头设置以及任何 SEO 插件。\n\n## 如何正确使用规范标签\n\n如果您有多个页面讨论大致相同的内容,但内容不足以形成差异,您需要指定一个主页面。规范标签会告诉搜索引擎哪个页面是主页面。\n\n同一页面可能有多个地址:\n\n```\nhttps://example.com/blog/choosing-trail-shoes\nhttps://example.com/blog/choosing-trail-shoes?utm_source=newsletter\nhttps://www.example.com/blog/choosing-trail-shoes\n```\n\n这三个地址显示的是同一篇文章。第一个是主地址:您希望 Google 在搜索结果中显示的地址。因此,所有三个地址都包含相同的规范标签,指向该主页面:\n\n```\n\n```\n\n当 Google 在 ?utm_source=newsletter 版本上看到此标签时,它会知道该页面是第一个地址的副本。主地址携带相同的标签,指向自身。这称为自引用规范标签,表示:“我是主版本”。\n\nGoogle 将其视为一个强烈信号,而非强制命令。如果您使用规范标签,每个主页面使用自引用规范标签是一种良好实践,Google 也推荐这样做。\n\n但你根本不需要使用规范标签。Google 表示指定规范标签并不是强制要求:如果没有规范标签,Google 会自行选择它认为最适合展示给用户的版本。当同一内容或非常相似的内容可以通过多个 URL 访问时(例如上面的三个地址),规范标签是一个不错的选择。\n\n这就是为什么缺少规范标签本身并不构成缺陷。在数据中,457 个被审计页面中有 27.1% 没有规范标签。真正重要的是这些页面是否存在重复内容,例如带有跟踪参数的版本,这些内容可能需要规范标签。\n\n查看实践网站的徒步鞋文章:\n\n```\ncurl -s http://localhost:8080/blog/choosing-trail-shoes | grep -i canonical\n```\n\n```\n\n```\n\n该文章将主页设为主版本,因此 Google 可能选择展示主页而非该文章,或忽略该标签。\n\n该文章内容是原创的,因此它本身应作为主版本。要修复这个问题,请将文章的规范标签指向文章本身:\n\n```\ncanonical: '/blog/choosing-trail-shoes',\n```\n\n## 如何修复缺失或重复的标题和元描述\n\n优秀的标题或元描述应长度适中、不过载,并能简洁地说明页面内容。它某种程度上是页面的核心,就像页面的简介。\n\n查看 Blue Runner 产品页面:\n\n```\ncurl -s http://localhost:8080/products/blue-runner | grep -i -E \"|name=\\\"description\\\"\"\n```\n\n```\n<title>Acme Shoes\n```\n\n该标题对页面内容没有任何说明,且完全没有描述信息。在 PowerShell 中,可以使用 | Select-String '|name=\"description\"' 来查找此类问题。\n\nGoogle 关于标题和摘要的指南要求每一页都应有独特且具有描述性的标题和描述。\n\n在实践网站中修复此问题,将 '/products/blue-runner' 条目中的标题行替换为:\n\n```\ntitle: 'Blue Runner Road Running Shoe | Acme Shoes',\ndescription: 'A lightweight road running shoe with a cushioned sole and free returns.',\n```\n\n## 如何使链接可爬取\n\n查看实践网站的主页:\n\n```\ncurl -s http://localhost:8080/\n```\n\n```\n<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Acme Shoes: Running Shoes for Every Runner\n\n\n\n\n

Acme Shoes

\nBlue Runner\nSummer sale\n\n\n```\n\n该页面的其他内容都很好:标题、描述、规范标签以及 Blue Runner 链接(这是一个带有 href 的真实 元素)。唯一的问题是 \"Summer sale\" 这个 元素。\n\n 基本上是非语义化的 HTML 元素,意味着它没有实际意义。真正的链接确实有含义:搜索引擎可以理解这是一个链接,屏幕阅读器也能识别这是一个链接。\n\n哪些链接需要可爬取?基本上是你希望搜索引擎看到的一切。我的意思是你要销售的产品、你的文章、你的课程以及其他类似的内容。\n\nGoogle 的链接指南指出,它只能可靠地爬取带有 href 属性的 元素。\n\n在实践网站中修复此问题,将 行替换为:\n\n```\n'Summer sale',\n```\n\n## 如何检查内容是否需要 JavaScript 才能显示\n\n在客户端渲染中,JavaScript 必须首先加载,之后其他内容才能加载。\n\nJavaScript 通常用于构建产品列表、价格、评论和菜单等内容。没有它时,客户端页面通常只会显示加载信息或空白框。\n\n谷歌确实会渲染 JavaScript,但会在稍后的阶段进行。页面会进入渲染队列,可能需要几秒甚至更长时间,而脚本如果失败或被阻塞,可能导致渲染后的页面缺少内容。\n\n这就是为什么服务器端渲染仍然是一个好主意,也是我更倾向于用于重要内容的方式。谷歌的 JavaScript 指南也持相同观点:服务器端渲染能为用户和爬虫提供更快的网站体验,并非所有爬虫都能运行 JavaScript。\n\n数据显示,在 277 个被审核的页面中,17.7% 的页面主要由 JavaScript 构建。这并不意味着谷歌无法抓取这些页面,只是说明它们的主要内容依赖于 JavaScript 正确运行。\n\n通过服务器端渲染,HTML 内容会直接发送到浏览器,之后才会执行 JavaScript 渲染。\n\n谷歌可以抓取通过这两种方式构建的页面。其爬虫使用最新版 Chrome 运行 JavaScript,因此服务器端渲染并不是进入谷歌索引的必要条件。\n\n下一个测试检查重要内容是否在没有 JavaScript 的情况下可见。它不会显示谷歌看到的内容(因为谷歌会运行 JavaScript),但会显示所有爬虫在 JavaScript 执行前看到的内容。\n\n在浏览器中打开 http://localhost:8080/catalog。你会看到三个产品。现在使用不运行 JavaScript 的 curl 下载页面:\n\n```\ncurl -s http://localhost:8080/catalog | grep -i \"trail grip\"\n```\n\n这不会输出任何内容,因为产品名称不在服务器发送的 HTML 中。在 `` 中,服务器只发送:\n\n```\n
Loading...
\n\n```\n\n如果不使用 curl,可以在浏览器中使用“查看页面源代码”功能。在这个页面上,你会看到 \"Loading...\" 和脚本,但看不到产品名称,因为浏览器只有在 JavaScript 执行后才会添加它们。\n\n在你自己的网站上,搜索页面源代码中的一句重要内容。\n\n要查看谷歌渲染页面的方式,可以使用谷歌自己的工具对实时页面进行测试。在你自己的网站上,搜索控制台中的 URL 检查工具(Test live URL,然后 View tested page)可以运行实时测试,并显示谷歌渲染的 HTML 和截图。\n\n对于任何公开页面,丰富结果测试(Rich Results Test)也会显示渲染后的 HTML。谷歌推荐两者都用于查找 JavaScript 问题。两者都无法访问 localhost,因此请在你的真实网站上尝试。\n\n如果你想从一开始就在 HTML 中显示产品名称,请在服务器端渲染它们。在示例网站中,将产品列表添加到路由上方:\n\n```\nconst products = ['Blue Runner', 'Trail Grip 2', 'City Glide'];\n```\n\n将 catalog 的 body 和 script 行替换为:\n\n```\nbody: '
' + products.map((p) => '

' + p + '

').join('') + '
',\n```\n\n并在 '/api/products' 入口处:\n\n```\nhtml: JSON.stringify(products),\n```\n\n重启服务器并再次运行 curl 命令:\n\n```\n

Blue Runner

Trail Grip 2

City Glide

\n```\n\n这之所以有效,是因为服务器现在在发送页面前就将产品名称写入 HTML。任何爬虫都能看到这些内容,即使它们无法运行 JavaScript,你仍然可以使用 JavaScript 实现交互功能。\n\n## 五分钟内能检查页面吗?\n\n说实话,这非常困难。可能会出现很多问题,五分钟的时间远远不够。\n\n要真正了解具体存在哪些问题,你需要运行完整的检查,例如在Google PageSpeed Insights中进行检查。如果网站属于你本人,还可以使用Google Search Console中的URL检查工具。\n\n本教程中的命令是一个不错的起点:\n\n- 使用curl -sI检查状态码和X-Robots-Tag头信息。\n\n- 使用curl -sIL检查旧地址以统计重定向次数。\n\n- 逐行查看/robots.txt文件。\n\n- 在页面源代码中检查noindex标签、canonical标签、标签、描述信息和重要内容。\n\n## 结论\n\n在本教程中,你修复了实践网站上的八个问题:软404错误、重定向链、robots.txt规则、隐藏的noindex头信息、错误的canonical标签、模糊的标题和缺失的描述、爬虫无法追踪的链接,以及需要JavaScript才能访问的内容。\n\n最重要的是,你需要持续检查网站。定期运行扫描,进行维护,确保网站功能正常,尤其是在对网站进行优化或更改时。\n\n如果你想更进一步,我关于在Next.js网站中添加结构化数据(JSON-LD)的教程是一个不错的下一步选择。\n\n如果你想一次性检查实时页面的多个问题,我的免费工具Greadme Page Audit可以无需注册直接测试任何URL。\n\n推荐课程(合作伙伴推荐,1/5)\n\n(在新标签页中打开)\n\n广告\n\n- Coursera 2026 Google Search Console:#1 SEO工具用于跟踪SEO Alex Genadinik 2小时 初学者 证书 查看课程(在新标签页中打开)\n\n- Udemy SEO 2027:如何在Google上排名第一 - 最终SEO课程 iMarket XL和Matt Jensen 4.3(1,883) 4小时48分钟 初学者 证书 查看课程(在新标签页中打开)\n\n- Udemy SEO:亚马逊联盟营销+SEO |250+视频 |18.0小时 The SEO Academy SEO教育领导者 4.5(3,420) 20小时6分钟 初学者 证书 查看课程(在新标签页中打开)\n\n- Skillshare SEO 2024:SEO入门 Arkadiusz Włodarczyk 4.3(10) 2小时54分钟 初学者 查看课程(在新标签页中打开)\n\n更多SEO课程请查看Class Central\n\n→\n\n推荐课程(合作伙伴推荐,2/5)\n\n- Udemy 从零开始学习高级SEO,完整SEO培训课程 Debajyoti Banerjee 4.2(1,772) 10小时51分钟 初学者 查看课程(在新标签页中打开)\n\n- Skillshare SEO审计 - 学习如何发现和修复网站上最常见的SEO问题 Joshua George 4.6(54) 1小时58分钟 初学者 查看课程(在新标签页中打开)\n\n- Skillshare SEO Google:SEO基础:WordPress SEO入门 Jim Bruce 4.4(26) 1小时26分钟 初学者 查看课程(在新标签页中打开)\n\n- Udemy SEO入门教程 Daragh Walsh 4.5(33,729) 45分钟 初学者 查看课程(在新标签页中打开)\n\n推荐课程(合作伙伴推荐,3/5)\n\n- Coursera 使用HTML & CSS创建多页应用 Omnya Khaled 4.2(14) 1小时55分钟 初学者 证书 查看课程(在新标签页中打开)\n\n- Coursera 搜索引擎优化课程 LearnKartS和Tanmoy Kumar Das 6周,每周3小时 初学者 证书 查看课程(在新标签页中打开)\n\n合作伙伴推荐课程(侧边栏,第4部分共5部分)\n\n合作伙伴推荐课程(侧边栏,第5部分共5部分)\n\n我是一名软件开发人员和SEO专家,热爱构建真正满足人们需求的产品。我喜欢将想法转化为实际产品,探索新技术并在过程中不断学习。我也热衷于与其他开发者分享所学知识。\n\n如果你读到这里,请向作者表达感谢以示支持。说声谢谢\n\n免费学习编程。freeCodeCamp的开源课程已帮助超过40,000人成为开发者。立即开始\n\n合作伙伴推荐课程","speakable":{"@type":"SpeakableSpecification","cssSelector":["[data-speakable='summary']","[data-speakable='takeaways']"]},"author":{"@type":"Organization","name":"freeCodeCamp.org","url":"https://www.freecodecamp.org"},"publisher":{"@type":"Organization","name":"traeai","url":"https://www.traeai.com","logo":{"@type":"ImageObject","url":"https://www.traeai.com/icon.svg"},"sameAs":["https://github.com/cq0206/traeai"]},"mainEntityOfPage":"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b"},{"@type":"WebSite","@id":"https://www.traeai.com/#website","url":"https://www.traeai.com","name":"traeai","description":"traeai 为开发者、研究员和内容团队筛选高质量 AI 技术内容,提供摘要、评分、趋势雷达与知识库产出。","inLanguage":["zh-CN","en"],"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://www.traeai.com/?q={search_term_string}"},"query-input":"required name=search_term_string"}},{"@type":"BreadcrumbList","@id":"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"首页","item":"https://www.traeai.com/"},{"@type":"ListItem","position":2,"name":"文章","item":"https://www.traeai.com/brief"},{"@type":"ListItem","position":3,"name":"freeCodeCamp.org","item":"https://www.traeai.com/sources"},{"@type":"ListItem","position":4,"name":"How to Find and Fix Common Technical SEO Issues on Your Website","item":"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b"}]}]}</script><article class="mx-auto max-w-3xl"><div class="mb-6 flex flex-wrap items-center gap-2 text-[13px] font-medium text-slate-500"><span class="rounded-md bg-slate-100 px-2 py-1 text-slate-700">freeCodeCamp.org</span><span aria-hidden="true">·</span><time dateTime="2026-11-03T19:00:29+00:00">2026年11月3日</time></div><div class="mb-5 flex items-start justify-between gap-4"><h1 class="text-[30px] font-black leading-tight text-slate-950 sm:text-[38px]">How to Find and Fix Common Technical SEO Issues on Your Website</h1><div aria-label="内容质量分 7.1" class="flex shrink-0 items-center gap-1.5 rounded-md border border-amber-200 bg-amber-50 px-2.5 py-1 text-amber-800" title="内容质量分 7.1"><span class="font-mono text-[15px] font-bold leading-none">7.1</span><span class="text-[11px] font-semibold">内容质量</span></div></div><div class="mb-6 flex flex-wrap items-center gap-2"><span class="inline-flex items-center gap-2" data-no-navigate="true"><button aria-label="保存到知识库" class="inline-flex min-h-7 items-center rounded-md border border-slate-200 bg-white px-2.5 py-1 text-xs font-semibold leading-tight text-slate-600 hover:border-cyan-200 hover:text-cyan-700 disabled:cursor-wait disabled:opacity-70 px-3 py-2 text-[13px]" type="button">保存到知识库</button></span><button class="inline-flex items-center gap-1.5 rounded-md border border-slate-200 font-semibold text-slate-600 hover:bg-slate-50 disabled:opacity-50 px-3 py-2 text-[13px]" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-text h-3.5 w-3.5" aria-hidden="true"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"></path><path d="M14 2v5a1 1 0 0 0 1 1h5"></path><path d="M10 9H8"></path><path d="M16 13H8"></path><path d="M16 17H8"></path></svg>保存为笔记</button></div><section aria-label="文章核心摘要" class="mb-6 rounded-lg border border-cyan-100 bg-cyan-50 p-4" data-ai-content="tldr"><div class="mb-3 flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sparkles h-4 w-4 text-cyan-700" aria-hidden="true"><path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"></path><path d="M20 2v4"></path><path d="M22 4h-4"></path><circle cx="4" cy="20" r="2"></circle></svg><h2 class="text-[16px] font-bold text-cyan-900">TL;DR · AI 摘要</h2></div><p class="mb-3 text-[14px] leading-7 text-slate-700" data-speakable="summary">How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built...</p><h3 class="mb-2 text-[13px] font-semibold text-slate-500">核心要点</h3><ul class="space-y-2" data-speakable="takeaways"><li class="flex items-start gap-2 text-[14px] leading-6 text-slate-700"><span aria-hidden="true" class="mt-2 h-1.5 w-1.5 shrink-0 rounded-md bg-cyan-500"></span><span>主题聚焦:How to Find and Fix Common Technical SEO Issues </span></li><li class="flex items-start gap-2 text-[14px] leading-6 text-slate-700"><span aria-hidden="true" class="mt-2 h-1.5 w-1.5 shrink-0 rounded-md bg-cyan-500"></span><span>来源:freeCodeCamp.org,建议结合原文判断细节。</span></li><li class="flex items-start gap-2 text-[14px] leading-6 text-slate-700"><span aria-hidden="true" class="mt-2 h-1.5 w-1.5 shrink-0 rounded-md bg-cyan-500"></span><span>AI 分析暂不可用,本条为保底评分与摘要。</span></li></ul></section><div class="mb-8 flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 pb-6"><div class="flex flex-wrap gap-2"><span class="rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600">#<!-- -->AI</span><span class="rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600">#<!-- -->编程</span><span class="rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600">#<!-- -->前端</span><span class="rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600">#<!-- -->后端</span><span class="rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600">#<!-- -->安全</span></div><a class="inline-flex items-center gap-2 rounded-md border border-slate-200 px-3 py-2 text-[13px] font-semibold text-slate-600 hover:border-cyan-200 hover:text-cyan-700" href="https://www.freecodecamp.org/news/fix-common-technical-seo-issues/" rel="noopener noreferrer" target="_blank">打开原文<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link h-3.5 w-3.5" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></div><div><h2 class="mt-10 mb-3 text-[24px] font-bold leading-tight text-slate-950 scroll-mt-24">如何发现并修复网站上的常见技术SEO问题</h2><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">2026年11月3日</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">/</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">#SEO</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">Saar Twito</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">假设你已经搭建了一个网站。你投入了设计,购买了域名,等等。但网站不仅仅是屏幕上看到的内容。幕后还有很多事情在发生。你需要了解互联网的工作原理,以及搜索引擎优化(SEO)的运作方式。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">速度也是其中的关键部分。一个加载缓慢的网站可能会有非常弱的SEO效果,因为大多数人不会花太多时间等待页面加载,尤其是在现在这个时代。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">网站速度是一个广为人知的话题,本身有许多需要考虑的问题,例如最大内容绘制(LCP)、累积布局偏移(CLS)和服务器速度。但我会在另一篇文章中详细讨论这些内容。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">本文重点介绍阻止搜索引擎访问和读取你页面的问题。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在我看来,技术SEO比常规SEO(侧重于内容和关键词)更难实施。技术方面通常需要开发者的知识,如果没有技术背景,可能需要进行一些令人不太舒服的更改。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">技术问题可能在数月内都未被发现,因为通常你看不到它。这不是设计问题。你只有在运行特定检查时才能发现它,例如使用Google PageSpeed Insights。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在本教程中,你将发现并修复小型练习网站上最常见的问题。我不想使用真实网站并让其所有者感到尴尬,因此我搭建了一个已经包含这些问题的练习网站。</p><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">目录</h3><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>先决条件</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>什么是技术SEO?</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>这些问题在真实网站上有多常见?</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何设置练习网站</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何检查页面的HTTP状态码 什么是软404?</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何发现并修复重定向链</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何确保robots.txt没有阻止重要页面</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何发现意外的noindex 如何检查robots元标签 如何检查X-Robots-Tag头</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何正确使用规范标签</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何修复缺失和重复的标题和元描述</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何使链接可爬取</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>如何检查内容是否需要JavaScript才能显示</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>五分钟内能否检查页面?</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>结论</li></ul><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">先决条件</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">你不需要是经验丰富的程序员也能跟上教程。你需要:</p><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>一个网络浏览器,如Chrome、Firefox、Edge或Safari。在Safari中,首先在“设置”>“高级”中启用“显示Web开发者功能”。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>一个终端:macOS上的终端,Windows上的PowerShell,或Linux上的任何终端。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>curl,一个下载网页的小程序。它包含在macOS、大多数Linux发行版以及Windows 10(1803版本及更高版本)和Windows 11中。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Node.js,用于运行练习网站。代码在Node.js 26.8和curl 8.7上进行了测试。</li></ul><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在Windows PowerShell中,使用curl.exe而不是curl,因为在Windows中curl是另一个命令的快捷方式。将 | grep -i "text" 替换为 | Select-String "text",并将 /dev/null 替换为 NUL。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">如果 Google 认定某页面值得收录,可能会将其添加到一个庞大的网页数据库中,这个数据库称为索引。Google 可以在搜索结果中考虑其索引中的页面,当这些页面与用户的搜索内容相关时。Google 关于搜索工作原理的指南将这三个步骤称为抓取、索引和提供。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">抓取并不保证索引,索引也不保证出现在搜索结果中。同一篇指南指出,即使页面完全遵循 Google 的规则,Google 也无法保证这三个阶段中的任何一阶段。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">修复技术问题不一定能让您的网站在 Google 上排名第一。但修复问题确实能提高排名的可能性,因为每解决一个问题,网站本身就会变得更好。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">技术 SEO 必须与常规 SEO 结合,例如关键词、反向链接、社交媒体互动等。</p><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">这些问题在真实网站中有多常见?</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">以下数据来自我开发的网站审计工具运行的审计结果。每个网站仅计算一次,使用的是其首次审计的数据,数据日期为 10 月 25 日。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">爬虫会检查一个网站上的许多页面(此处中位数为 10 页)。单页审计通常检查首页,一次只检查一页。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">问题 | 出现频率 | 示例 --- | --- | --- 至少有一个页面没有规范标签 | 64.2% 的网站 | 53 个爬取的网站,2025 年 8 月至 2026 年 10 月 两个或更多页面标题完全相同 | 61.8% 的网站 | 34 个爬取的网站,其中两个或更多页面加载成功 至少有一个页面没有元描述 | 49.1% 的网站 | 53 个爬取的网站 至少有一个链接指向返回 404 的页面 | 18.9% 的网站 | 页面主要由 JavaScript 构建 | 17.7% 的页面 | 277 次单页审计,2026 年 5 月至 10 月 至少有一个页面没有标题 | 13.2% 的网站 | 搜索引擎可能无法追踪的链接 | 8.3% 的页面 | 278 次单页审计 包含错误的 robots.txt 文件或加载失败的文件 | 7.9% 的网站 | 252 次单页审计,2026 年 7 月至 10 月 页面被 noindex 或 robots.txt 阻止 | 4.8% 的页面 | 251 次单页审计,2026 年 7 月至 10 月</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">这些都是技术问题,但它们的重要性并不相同。缺少规范标签的问题最为常见,但 Google 并不要求必须使用规范标签,因此缺少规范标签的页面本身并不算损坏。当相同或非常相似的内容可以通过多个 URL 访问时,这个问题才会变得重要,这将在规范标签部分进一步说明。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">重复标题是我自己也遇到过的问题:编写代码时,很容易忽略这类问题。这就是为什么有工具可以检查这些问题。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">让我们逐一查看表格中的每个问题,确保它们都清晰明了:</p><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li><strong class="font-semibold text-slate-900">缺少规范标签</strong>:规范标签是您在 HTML 的 <code class="rounded bg-slate-100 px-1.5 py-0.5 text-[14px] font-mono text-slate-800"><head></code> 部分放置的众多标签之一。当两到三页的内容几乎完全相同时,它会告诉搜索引擎(如 Google)哪个 URL 是原始的、主要的版本,也就是您希望被收录的版本。虽然这不是强制要求,但如果没有规范标签,Google 会自行选择主要版本,因此这个问题主要影响存在重复页面的情况。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li><strong class="font-semibold text-slate-900">重复标题</strong>:在两个页面上出现相同的标题其实非常容易。您不希望出现重复标题,因为这不仅没有帮助,还可能让 Google 感到困惑。每一页都应该明确说明其内容。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>缺少元描述:这一点非常重要,因为它不仅有助于搜索引擎,还能帮助像 ChatGPT 这样的 AI 工具。元描述的作用是简明扼要地说明页面内容和用途。如果你在 Google 上搜索某个网站,会看到它显示在实际链接下方。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>指向 404 页面的链接:这意味着你存在一个失效链接(可能是你不再使用的链接),指向一个不存在的页面。因此,这个链接不应该指向不存在的内容,而是应引导到类似页面或真实存在的内容,以确保链接的相关性。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>主要由 JavaScript 构建的页面:虽然 Google 可以运行 JavaScript,但这本身不会阻止页面被 Google 收录。但内容只有在 JavaScript 加载执行后才会显示,这会降低访问速度,并增加出错的可能性。并非所有爬虫都能执行 JavaScript,因此我更倾向于对重要内容使用服务端渲染。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>搜索引擎无法追踪的链接:这不算大问题,具体影响取决于链接指向的位置。例如,如果我写了一篇很好的文章并希望它在 Google 上获得排名,但搜索引擎无法追踪到该链接,那么你投入大量时间和精力撰写的这篇文章可能只会被少数人看到。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>robots.txt 文件中的错误:robots.txt 的作用是帮助你与搜索引擎沟通。如果该文件存在错误,可能会阻止搜索引擎爬取你希望出现在搜索结果中的页面。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>被 noindex 或 robots.txt 屏蔽的页面:这是两种不同的情况。noindex 规则要求搜索引擎不要将页面收录到结果中,而 robots.txt 规则仅阻止搜索引擎爬取页面。你将在本教程后续部分了解更多关于这两者的区别及其重要性。</li></ul><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">软性 404 错误、重定向链和错误的 canonical 标签未包含在表格中,因为审核工具不会记录这些问题。</p><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">如何搭建练习网站</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">练习网站是一个虚构鞋店 Acme Shoes 的小型网站。网站每一页都内置了一个问题。你不需要理解代码中的每一行。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">创建一个新文件夹,添加一个名为 server.js 的文件,并粘贴以下代码:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">// server.js: 一个包含常见技术 SEO 问题的小型练习网站 const http = require('node:http'); const PORT = 8080; const BASE = 'http://localhost:' + PORT; // 构建一个简单的 HTML 页面。省略字段可省略对应标签 function page({ title, description, canonical, robots, body, script }) { return [ '<!doctype html>', '<html lang="en">', '<head>', '<meta charset="utf-8">', title && '<title>' + title + '</title>', description && '<meta name="description" content="' + description + '">', canonical && '<link rel="canonical" href="' + BASE + canonical + '">', robots && '<meta name="robots" content="' + robots + '">', '</head>', '<body>', body, script && '<script>' + script + '</script>', '</body>', '</html>', ] .filter(Boolean) .join('\n'); }</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">javascript</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">const routes = { '/': { html: page({ description: '适用于道路和山径的轻便跑步鞋,提供免费退换货服务。', canonical: '/', body: [ '<h1>Acme Shoes</h1>', '<a href="/products/blue-runner">Blue Runner</a>', '<span onclick="location.href=\'/sale\'">夏季促销</span>', ].join('\n'), }), }, // 问题:标题模糊且缺少元描述 '/products/blue-runner': { html: page({ canonical: '/products/blue-runner', body: '<h1>Blue Runner</h1>', }), }, // 问题:缺失的产品页面仍返回"200 OK"状态码(软404) '/products/red-runner': { html: page({ body: '<h1>抱歉,未找到该产品。</h1>', }), }, // 问题:存在重定向链,/old-sale -> /sale-2025 -> /sale '/old-sale': { redirect: '/sale-2025' }, '/sale-2025': { redirect: '/sale' }, '/sale': { html: page({ description: "最高优惠40%购买上季跑步鞋,截止8月31日。", canonical: '/sale', body: '<h1>夏季促销</h1>', }), }, // 问题:页面本身无法看到的noindex头部 '/about': { headers: { 'X-Robots-Tag': 'noindex' }, html: page({ description: '了解这个两人工作室如何发展成为跑步鞋品牌。', canonical: '/about', body: '<h1>关于我们</h1>', }), }, // 问题:规范URL标签指向首页 '/blog/choosing-trail-shoes': { html: page({ description: '抓地力、落差和贴合度:选择山地跑步鞋时需要关注的关键要素。', canonical: '/', body: '<h1>如何选择山地跑步鞋</h1>', }), }, // 问题:内容需要JavaScript执行后才会加载 '/catalog': { html: page({ description: '浏览所有Acme跑步鞋产品。', canonical: '/catalog', body: '<div id="app">加载中...</div>', script: "fetch('/api/products').then((r) => r.json()).then((products) => {" + "document.getElementById('app').innerHTML = products.map((p) => '<h2>' + p + '</h2>').join('');" + '});', }), }, '/api/products': { type: 'application/json', html: JSON.stringify(['Blue Runner', 'Trail Grip 2', 'City Glide']), }, // 问题:robots.txt中的"Disallow: /blog"会阻止所有以/blog开头的路径 '/robots.txt': { type: 'text/plain', html: 'User-agent: *\nDisallow: /blog\n', }, }; http .createServer((req, res) => { const path = new URL(req.url, BASE).pathname; const route = routes[path]; if (!route) { res.writeHead(404, { 'Content-Type': 'text/html; charset=utf-8' }); return res.end(page({ title: '页面未找到', body: '<h1>页面未找到</h1>' })); } if (route.redirect) { res.writeHead(301, { Location: route.redirect }); return res.end(); } res.writeHead(200, { 'Content-Type': (route.type || 'text/html') + '; charset=utf-8', ...route.headers, }); res.end(route.html); }) .listen(PORT, () => console.log('练习站点运行在 ' + BASE));</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">每个 <code class="rounded bg-slate-100 px-1.5 py-0.5 text-[14px] font-mono text-slate-800">routes</code> 键对应一个页面地址。以 Problem: 开头的注释说明了每个页面存在的问题。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">从同一文件夹启动服务器:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">node server.js</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">你应该看到:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">Practice site running at http://localhost:8080</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">保持服务器运行,然后打开第二个终端执行以下命令。当你修改 server.js 时,用 Ctrl+C 停止服务器并重新启动。</p><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">如何检查页面的 HTTP 状态码</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">我记得刚开始构建网站时,做过各种各样的小项目。作为全栈开发者,我一直在尝试各种实验。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">有一次服务器端出现故障,我在 Network 标签页看到返回了 500 错误。另一次我故意删除了某个页面,想看看是否会触发 404 或其他问题。如果你在构建网站时多做尝试,会从结果中学到很多。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">HTTP 状态码是搜索引擎读取的第一项信息。它们是服务器与客户端(如你的浏览器)通信的方式。状态码分为五个区间:1xx、2xx、3xx、4xx 和 5xx。例如 5xx 状态码表示服务器问题,4xx 状态码表示客户端问题。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">404 是最常见的错误。它表示站点上找不到该页面。你经常会看到 404 错误,通常只需维护好网站和链接即可解决。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">本教程中你会看到以下状态码:</p><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>200 OK:页面已找到</li><li>301 Moved Permanently:页面已永久迁移至新地址</li><li>404 Not Found:此处无页面</li></ul><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">根据 Google 的 HTTP 状态码文档,Google 不会对返回 4xx 状态码的 URL 进行索引。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">要查看练习网站首页的状态码,使用 -I 参数(仅显示头部信息)和 -s 参数(隐藏 curl 进度条):</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -sI http://localhost:8080/</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Date: Sun, 25 Oct 2026 17:42:53 GMT Connection: keep-alive Keep-Alive: timeout=5</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">现在请求一个不在路由表中的地址,看看正确的 404 错误是什么样子:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -sI http://localhost:8080/products/does-not-exist</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">HTTP/1.1 404 Not Found Content-Type: text/html; charset=utf-8 Date: Sun, 25 Oct 2026 17:42:53 GMT Connection: keep-alive Keep-Alive: timeout=5</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在浏览器中打开开发者工具(F12 或 Mac 上的 Cmd+Option+I),进入 Network 标签页并刷新页面。状态列会显示状态码。</p><h4 class="mt-6 mb-2 text-[17px] font-bold leading-tight text-slate-900 scroll-mt-24">什么是软 404?</h4><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">检查一个商店已停止销售的商品:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -sI http://localhost:8080/products/red-runner</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在浏览器中,同一页面会显示"抱歉,未找到该商品"。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">软 404 本质上是"页面未找到",但服务器仍返回 200 状态码。这会误导 Google,因为网址仍然存在,但内容已不再更新。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">要解决这个问题,应让缺失页面返回真正的 404 状态码,这正是 Google 推荐的做法。在练习网站中,从路由表中删除 '/products/red-runner' 条目。服务器随后会返回 404 状态码。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">破损链接会导致相同的结果。根据数据,被爬取的 53 个网站中有 18.9% 至少包含一个指向返回 404 的页面的链接。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">因此不要留下指向不存在内容的链接。应将其更新为指向相似内容或确实存在的页面。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">如果页面已迁移,应从旧地址添加 301 重定向到新地址。只有当页面确实不存在时,404 才是正确的响应。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">重定向基本上是指当你希望将一个 URL(可能是一个已不存在的 URL)发送到另一个 URL(存在的 URL)时的操作。例如,如果你将域名从 example-x.com 更改为 example-y.com,你可能会设置重定向,让所有输入 example-x.com 的用户自动跳转到 example-y.com。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">重定向本身是合理的,如果使用得当,它们可以非常有用。301 表示页面已永久移动,302 表示移动是临时的。Google 关于重定向的文档解释了它对每种状态的处理方式,其爬虫会跟踪最多 10 次重定向跳转。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">但当旧地址(例如过去使用过的域名)重定向到新地址后,新地址又继续重定向,形成链式结构时,问题就出现了。少量重定向影响不大,但五次、六次甚至七次重定向则可能造成显著问题。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">下面的第一个命令会显示链中的每一步,第二个命令会给出一行摘要。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">添加 -L 参数让 curl 跟随重定向:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -sIL http://localhost:8080/old-sale</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">HTTP/1.1 301 Moved Permanently Location: /sale-2025 Date: Sun, 25 Oct 2026 17:42:53 GMT Connection: keep-alive Keep-Alive: timeout=5 HTTP/1.1 301 Moved Permanently Location: /sale Date: Sun, 25 Oct 2026 17:42:53 GMT Connection: keep-alive Keep-Alive: timeout=5 HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Date: Sun, 25 Oct 2026 17:42:53 GMT Connection: keep-alive Keep-Alive: timeout=5</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">/old-sale 会跳转到 /sale-2025,再跳转到 /sale。要获取一行摘要:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -sL -o /dev/null -w "%{num_redirects} redirects, ended at %{url_effective}\n" http://localhost:8080/old-sale</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">2 redirects, ended at http://localhost:8080/sale</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">-o /dev/null 告诉 curl 将页面的 HTML 内容丢弃,避免填充终端,只输出摘要信息。-w 参数用于设置摘要内容的格式。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">要修复这个问题,应直接将旧地址指向最终页面:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">'/old-sale': { redirect: '/sale' },</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">重启服务器并再次运行摘要命令。现在显示为 1 次重定向,最终到达 http://localhost:8080/sale。</p><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">如何确保 robots.txt 没有阻止重要页面</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">robots.txt 是网站告知搜索引擎(如 Google 及其爬虫)哪些内容可以访问、哪些不能访问的方式。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">查看实践站点的文件:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -s http://localhost:8080/robots.txt</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">User-agent: * Disallow: /blog</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">Disallow: /blog 是危险的,因为它阻止爬虫访问所有以 /blog 开头的路径。而通常,你的文章内容是推动网站流量的主要因素。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">Google 的 robots.txt 文档提供了类似的示例:Disallow: /fish 也会阻止 /fish.html 和 /fishheads。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">要修复这个问题,应仅阻止你本意要阻止的内容,例如草稿文件夹:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">User-agent: * Disallow: /blog-drafts/</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在实践站点中,修改 '/robots.txt' 条目的 html 行:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">html: 'User-agent: *\nDisallow: /blog-drafts/\n',</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">robots.txt 控制的是爬虫抓取行为,而非索引。Google 表示这不是阻止页面出现在 Google 中的机制。若要实现此目的,需要使用 noindex。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">即使某个 URL 被 robots.txt 阻止,它仍可能出现在搜索结果中(通常没有描述),如果其他页面链接到它。Google 只是永远不会读取该页面的内容。</p><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">如何发现意外的 noindex</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">noindex 告诉 Google 不要索引特定页面。当它出现在您希望被索引和排名的页面(如产品页面或首页)时会产生负面影响。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">但在您不希望被排名的页面,或对网站贡献较小的页面(如登录、注册页面)上,它可以发挥积极作用。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">只有当爬虫能够访问页面并读取规则时,noindex 才会生效。如果 robots.txt 阻止了相同 URL,Google 将永远看不到 noindex,页面仍可能出现在搜索结果中。因此,若希望某页面不在 Google 中显示,请使用 noindex 并确保页面可被爬虫访问。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在数据中,457 个审计页面中有 11 个(2.4%)包含 noindex robots 元标签。设置该标签有两种方式,需要检查两者。</p><h4 class="mt-6 mb-2 text-[17px] font-bold leading-tight text-slate-900 scroll-mt-24">如何检查 Robots 元标签</h4><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">第一种方式是页面 <head> 中的标签:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50"><meta name="robots" content="noindex"></code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在页面中搜索该词:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -s http://localhost:8080/about | grep -i noindex</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在关于页面中,这会输出空内容。您也可以右键点击页面,选择“查看页面源代码”,然后搜索 noindex。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">修复 noindex 非常简单。您只需将其删除,搜索引擎即可索引页面。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在页面代码或模板中查找该标签,并检查 CMS 或 SEO 插件设置。在 WordPress 中,“Discourage search engines from indexing this site” 设置会将该标签添加到每个页面。</p><h4 class="mt-6 mb-2 text-[17px] font-bold leading-tight text-slate-900 scroll-mt-24">如何检查 X-Robots-Tag 请求头</h4><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">第二种方式是 HTTP 请求头。检查关于页面的请求头:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -sI http://localhost:8080/about</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 X-Robots-Tag: noindex Date: Sun, 25 Oct 2026 17:42:59 GMT Connection: keep-alive Keep-Alive: timeout=5</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">该请求头不会出现在“查看页面源代码”中,只会出现在响应头中。在数据中,12 个被阻止页面中有 5 个 HTML 中没有 noindex:其中 2 个有此请求头,3 个被 robots.txt 阻止爬取。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在实践站点中修复此问题,需从 '/about' 条目中删除请求头行。在真实站点中,需检查服务器配置、托管提供商的请求头设置以及任何 SEO 插件。</p><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">如何正确使用规范标签</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">如果您有多个页面讨论大致相同的内容,但内容不足以形成差异,您需要指定一个主页面。规范标签会告诉搜索引擎哪个页面是主页面。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">同一页面可能有多个地址:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">https://example.com/blog/choosing-trail-shoes https://example.com/blog/choosing-trail-shoes?utm_source=newsletter https://www.example.com/blog/choosing-trail-shoes</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">这三个地址显示的是同一篇文章。第一个是主地址:您希望 Google 在搜索结果中显示的地址。因此,所有三个地址都包含相同的规范标签,指向该主页面:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50"><link rel="canonical" href="https://example.com/blog/choosing-trail-shoes"></code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">当 Google 在 ?utm_source=newsletter 版本上看到此标签时,它会知道该页面是第一个地址的副本。主地址携带相同的标签,指向自身。这称为自引用规范标签,表示:“我是主版本”。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">Google 将其视为一个强烈信号,而非强制命令。如果您使用规范标签,每个主页面使用自引用规范标签是一种良好实践,Google 也推荐这样做。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">但你根本不需要使用规范标签。Google 表示指定规范标签并不是强制要求:如果没有规范标签,Google 会自行选择它认为最适合展示给用户的版本。当同一内容或非常相似的内容可以通过多个 URL 访问时(例如上面的三个地址),规范标签是一个不错的选择。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">这就是为什么缺少规范标签本身并不构成缺陷。在数据中,457 个被审计页面中有 27.1% 没有规范标签。真正重要的是这些页面是否存在重复内容,例如带有跟踪参数的版本,这些内容可能需要规范标签。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">查看实践网站的徒步鞋文章:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -s http://localhost:8080/blog/choosing-trail-shoes | grep -i canonical</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50"><link rel="canonical" href="http://localhost:8080/"></code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">该文章将主页设为主版本,因此 Google 可能选择展示主页而非该文章,或忽略该标签。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">该文章内容是原创的,因此它本身应作为主版本。要修复这个问题,请将文章的规范标签指向文章本身:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">canonical: '/blog/choosing-trail-shoes',</code></pre></div></div><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">如何修复缺失或重复的标题和元描述</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">优秀的标题或元描述应长度适中、不过载,并能简洁地说明页面内容。它某种程度上是页面的核心,就像页面的简介。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">查看 Blue Runner 产品页面:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -s http://localhost:8080/products/blue-runner | grep -i -E "<title>|name=\"description\""</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50"><title>Acme Shoes</title></code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">该标题对页面内容没有任何说明,且完全没有描述信息。在 PowerShell 中,可以使用 | Select-String '<title>|name="description"' 来查找此类问题。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">Google 关于标题和摘要的指南要求每一页都应有独特且具有描述性的标题和描述。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在实践网站中修复此问题,将 '/products/blue-runner' 条目中的标题行替换为:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50"> description: 'A lightweight road running shoe with a cushioned sole and free returns.',</code></pre></div></div><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">如何使链接可爬取</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">查看实践网站的主页:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -s http://localhost:8080/</code></pre></div></div><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50"><!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Acme Shoes: Running Shoes for Every Runner</title> <meta name="description" content="Lightweight running shoes for road and trail, with free returns."> <link rel="canonical" href="http://localhost:8080/"> </head> <body> <h1>Acme Shoes</h1> <a href="/products/blue-runner">Blue Runner</a> <span onclick="location.href='/sale'">Summer sale</span> </body> </html></code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">该页面的其他内容都很好:标题、描述、规范标签以及 Blue Runner 链接(这是一个带有 href 的真实 <a> 元素)。唯一的问题是 "Summer sale" 这个 <span> 元素。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words"><span> 基本上是非语义化的 HTML 元素,意味着它没有实际意义。真正的链接确实有含义:搜索引擎可以理解这是一个链接,屏幕阅读器也能识别这是一个链接。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">哪些链接需要可爬取?基本上是你希望搜索引擎看到的一切。我的意思是你要销售的产品、你的文章、你的课程以及其他类似的内容。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">Google 的链接指南指出,它只能可靠地爬取带有 href 属性的 <a> 元素。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在实践网站中修复此问题,将 <span> 行替换为:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">'<a href="/sale">Summer sale</a>',</code></pre></div></div><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">如何检查内容是否需要 JavaScript 才能显示</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在客户端渲染中,JavaScript 必须首先加载,之后其他内容才能加载。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">JavaScript 通常用于构建产品列表、价格、评论和菜单等内容。没有它时,客户端页面通常只会显示加载信息或空白框。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">谷歌确实会渲染 JavaScript,但会在稍后的阶段进行。页面会进入渲染队列,可能需要几秒甚至更长时间,而脚本如果失败或被阻塞,可能导致渲染后的页面缺少内容。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">这就是为什么服务器端渲染仍然是一个好主意,也是我更倾向于用于重要内容的方式。谷歌的 JavaScript 指南也持相同观点:服务器端渲染能为用户和爬虫提供更快的网站体验,并非所有爬虫都能运行 JavaScript。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">数据显示,在 277 个被审核的页面中,17.7% 的页面主要由 JavaScript 构建。这并不意味着谷歌无法抓取这些页面,只是说明它们的主要内容依赖于 JavaScript 正确运行。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">通过服务器端渲染,HTML 内容会直接发送到浏览器,之后才会执行 JavaScript 渲染。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">谷歌可以抓取通过这两种方式构建的页面。其爬虫使用最新版 Chrome 运行 JavaScript,因此服务器端渲染并不是进入谷歌索引的必要条件。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">下一个测试检查重要内容是否在没有 JavaScript 的情况下可见。它不会显示谷歌看到的内容(因为谷歌会运行 JavaScript),但会显示所有爬虫在 JavaScript 执行前看到的内容。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在浏览器中打开 http://localhost:8080/catalog。你会看到三个产品。现在使用不运行 JavaScript 的 curl 下载页面:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">curl -s http://localhost:8080/catalog | grep -i "trail grip"</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">这不会输出任何内容,因为产品名称不在服务器发送的 HTML 中。在 <code class="rounded bg-slate-100 px-1.5 py-0.5 text-[14px] font-mono text-slate-800"><body></code> 中,服务器只发送:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50"><div id="app">Loading...</div> <script>fetch('/api/products').then((r) => r.json()).then((products) => {document.getElementById('app').innerHTML = products.map((p) => '<h2>' + p + '</h2>').join('');});</script></code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">如果不使用 curl,可以在浏览器中使用“查看页面源代码”功能。在这个页面上,你会看到 "Loading..." 和脚本,但看不到产品名称,因为浏览器只有在 JavaScript 执行后才会添加它们。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在你自己的网站上,搜索页面源代码中的一句重要内容。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">要查看谷歌渲染页面的方式,可以使用谷歌自己的工具对实时页面进行测试。在你自己的网站上,搜索控制台中的 URL 检查工具(Test live URL,然后 View tested page)可以运行实时测试,并显示谷歌渲染的 HTML 和截图。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">对于任何公开页面,丰富结果测试(Rich Results Test)也会显示渲染后的 HTML。谷歌推荐两者都用于查找 JavaScript 问题。两者都无法访问 localhost,因此请在你的真实网站上尝试。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">如果你想从一开始就在 HTML 中显示产品名称,请在服务器端渲染它们。在示例网站中,将产品列表添加到路由上方:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">const products = ['Blue Runner', 'Trail Grip 2', 'City Glide'];</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">将 catalog 的 body 和 script 行替换为:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">body: '<div id="app">' + products.map((p) => '<h2>' + p + '</h2>').join('') + '</div>',</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">并在 '/api/products' 入口处:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50">html: JSON.stringify(products),</code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">重启服务器并再次运行 curl 命令:</p><div class="code-block group relative my-5 "><div class="flex items-center justify-between rounded-t-lg border border-slate-700 bg-slate-800 px-4 py-2"><span class="select-none text-xs font-medium uppercase tracking-wide text-slate-400">code</span><button aria-label="复制代码" class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-slate-400 transition-colors hover:bg-slate-700 hover:text-slate-200" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-3.5 w-3.5" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg><span>复制</span></button></div><div class="overflow-x-auto rounded-b-lg border border-t-0 border-slate-700 bg-[#24292e] text-[13px] leading-6 [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:!p-4"><pre class="!m-0 !rounded-none !border-0 !bg-transparent !p-4"><code class="text-slate-50"><div id="app"><h2>Blue Runner</h2><h2>Trail Grip 2</h2><h2>City Glide</h2></div></code></pre></div></div><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">这之所以有效,是因为服务器现在在发送页面前就将产品名称写入 HTML。任何爬虫都能看到这些内容,即使它们无法运行 JavaScript,你仍然可以使用 JavaScript 实现交互功能。</p><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">五分钟内能检查页面吗?</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">说实话,这非常困难。可能会出现很多问题,五分钟的时间远远不够。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">要真正了解具体存在哪些问题,你需要运行完整的检查,例如在Google PageSpeed Insights中进行检查。如果网站属于你本人,还可以使用Google Search Console中的URL检查工具。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">本教程中的命令是一个不错的起点:</p><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>使用curl -sI检查状态码和X-Robots-Tag头信息。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>使用curl -sIL检查旧地址以统计重定向次数。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>逐行查看/robots.txt文件。</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>在页面源代码中检查noindex标签、canonical标签、<title>标签、描述信息和重要内容。</li></ul><h3 class="mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24">结论</h3><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">在本教程中,你修复了实践网站上的八个问题:软404错误、重定向链、robots.txt规则、隐藏的noindex头信息、错误的canonical标签、模糊的标题和缺失的描述、爬虫无法追踪的链接,以及需要JavaScript才能访问的内容。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">最重要的是,你需要持续检查网站。定期运行扫描,进行维护,确保网站功能正常,尤其是在对网站进行优化或更改时。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">如果你想更进一步,我关于在Next.js网站中添加结构化数据(JSON-LD)的教程是一个不错的下一步选择。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">如果你想一次性检查实时页面的多个问题,我的免费工具Greadme Page Audit可以无需注册直接测试任何URL。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">推荐课程(合作伙伴推荐,1/5)</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">(在新标签页中打开)</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">广告</p><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Coursera 2026 Google Search Console:#1 SEO工具用于跟踪SEO Alex Genadinik 2小时 初学者 证书 查看课程(在新标签页中打开)</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Udemy SEO 2027:如何在Google上排名第一 - 最终SEO课程 iMarket XL和Matt Jensen 4.3(1,883) 4小时48分钟 初学者 证书 查看课程(在新标签页中打开)</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Udemy SEO:亚马逊联盟营销+SEO |250+视频 |18.0小时 The SEO Academy SEO教育领导者 4.5(3,420) 20小时6分钟 初学者 证书 查看课程(在新标签页中打开)</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Skillshare SEO 2024:SEO入门 Arkadiusz Włodarczyk 4.3(10) 2小时54分钟 初学者 查看课程(在新标签页中打开)</li></ul><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">更多SEO课程请查看Class Central</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">→</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">推荐课程(合作伙伴推荐,2/5)</p><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Udemy 从零开始学习高级SEO,完整SEO培训课程 Debajyoti Banerjee 4.2(1,772) 10小时51分钟 初学者 查看课程(在新标签页中打开)</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Skillshare SEO审计 - 学习如何发现和修复网站上最常见的SEO问题 Joshua George 4.6(54) 1小时58分钟 初学者 查看课程(在新标签页中打开)</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Skillshare SEO Google:SEO基础:WordPress SEO入门 Jim Bruce 4.4(26) 1小时26分钟 初学者 查看课程(在新标签页中打开)</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Udemy SEO入门教程 Daragh Walsh 4.5(33,729) 45分钟 初学者 查看课程(在新标签页中打开)</li></ul><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">推荐课程(合作伙伴推荐,3/5)</p><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Coursera 使用HTML & CSS创建多页应用 Omnya Khaled 4.2(14) 1小时55分钟 初学者 证书 查看课程(在新标签页中打开)</li></ul><ul class="my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400"><li>Coursera 搜索引擎优化课程 LearnKartS和Tanmoy Kumar Das 6周,每周3小时 初学者 证书 查看课程(在新标签页中打开)</li></ul><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">合作伙伴推荐课程(侧边栏,第4部分共5部分)</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">合作伙伴推荐课程(侧边栏,第5部分共5部分)</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">我是一名软件开发人员和SEO专家,热爱构建真正满足人们需求的产品。我喜欢将想法转化为实际产品,探索新技术并在过程中不断学习。我也热衷于与其他开发者分享所学知识。</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">如果你读到这里,请向作者表达感谢以示支持。说声谢谢</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">免费学习编程。freeCodeCamp的开源课程已帮助超过40,000人成为开发者。立即开始</p><p class="my-4 text-[17px] leading-8 text-slate-800 break-words">合作伙伴推荐课程</p></div><button aria-label="AI 伴读" class="fixed bottom-6 right-6 z-50 flex items-center gap-2 rounded-full bg-cyan-600 px-4 py-3 text-[14px] font-semibold text-white shadow-lg transition-all hover:bg-cyan-700 hover:shadow-xl active:scale-95" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-circle h-5 w-5" aria-hidden="true"><path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"></path></svg>AI 伴读</button><div aria-hidden="true" class="sr-only" data-ai-content="machine-digest" role="presentation"><p data-field="title">How to Find and Fix Common Technical SEO Issues on Your Website</p><p data-field="source">freeCodeCamp.org</p><p data-field="summary">How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built...</p><p data-field="takeaways">1. 主题聚焦:How to Find and Fix Common Technical SEO Issues 2. 来源:freeCodeCamp.org,建议结合原文判断细节。 3. AI 分析暂不可用,本条为保底评分与摘要。</p><p data-field="tags">AI, 编程, 前端, 后端, 安全</p></div></article></main></div><!--$--><!--/$--><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.traeai.com/#organization","name":"traeai","url":"https://www.traeai.com","sameAs":["https://github.com/cq0206/traeai"]},{"@type":"WebSite","@id":"https://www.traeai.com/#website","name":"traeai","url":"https://www.traeai.com","description":"traeai 为开发者、研究员和内容团队筛选高质量 AI 技术内容,提供摘要、评分、趋势雷达与知识库产出。","inLanguage":["zh-CN","en"],"publisher":{"@id":"https://www.traeai.com/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://www.traeai.com/?q={search_term_string}"},"query-input":"required name=search_term_string"}},{"@type":"SoftwareApplication","@id":"https://www.traeai.com/#app","name":"traeai","url":"https://www.traeai.com","description":"traeai 为开发者、研究员和内容团队筛选高质量 AI 技术内容,提供摘要、评分、趋势雷达与知识库产出。","applicationCategory":"BusinessApplication","operatingSystem":"Web","availableLanguage":["zh-CN","en"],"offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"featureList":["AI 技术内容筛选","摘要与评分","趋势雷达","知识库素材库","研究报告与社媒内容生成"]}]}</script><script src="/_next/static/chunks/webpack-5e28ce9a93e0f077.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[52748,[],\"\"]\n3:I[82778,[],\"\"]\n4:I[15344,[\"4345\",\"static/chunks/app/not-found-03edda9b12bfb15e.js\"],\"NotFoundTracker\"]\n7:I[45433,[],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\nb:I[45433,[],\"ViewportBoundary\"]\nd:I[45433,[],\"MetadataBoundary\"]\nf:I[9608,[],\"default\",1]\n:HL[\"/_next/static/css/44a7134226832833.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"articles\",\"75786002-fd1d-4153-8a9c-95e923c4269b\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[[\"locale\",\"zh\",\"d\",null],{\"children\":[\"articles\",{\"children\":[[\"id\",\"75786002-fd1d-4153-8a9c-95e923c4269b\",\"d\",null],{\"children\":[\"__PAGE__\",{}]}]}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/44a7134226832833.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"html\",null,{\"lang\":\"zh\",\"children\":[\"$\",\"body\",null,{\"className\":\"flex min-h-screen items-center justify-center bg-slate-50 font-sans text-slate-900\",\"children\":[[\"$\",\"$L4\",null,{}],[\"$\",\"main\",null,{\"className\":\"mx-auto max-w-md px-6 py-16 text-center\",\"children\":[[\"$\",\"h1\",null,{\"className\":\"text-[64px] font-black tracking-tight text-slate-300\",\"children\":\"404\"}],[\"$\",\"p\",null,{\"className\":\"mt-4 text-[16px] leading-7 text-slate-600\",\"children\":\"找不到这个页面。它可能已被移除、合并或尚未创建。\"}],[\"$\",\"a\",null,{\"className\":\"mt-6 inline-block rounded-md border border-slate-200 px-4 py-2 text-[14px] font-semibold text-slate-700 hover:bg-slate-100\",\"href\":\"/\",\"children\":\"返回首页\"}]]}]]}]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,\"$L5\"]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[\"$L6\",null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],{},null,false,null]},null,false,\"$@a\"]},null,false,\"$@a\"]},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"KWVz4QWEesdBvhBuQJAKd\"}\n"])</script><script>self.__next_f.push([1,"10:[]\na:\"$W10\"\n"])</script><script>self.__next_f.push([1,"13:I[24680,[\"299\",\"static/chunks/299-adffce14862fb047.js\",\"8450\",\"static/chunks/app/%5Blocale%5D/layout-4de1e28806a4e1c6.js\"],\"\"]\n12:T519,{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.traeai.com/#organization\",\"name\":\"traeai\",\"url\":\"https://www.traeai.com\",\"sameAs\":[\"https://github.com/cq0206/traeai\"]},{\"@type\":\"WebSite\",\"@id\":\"https://www.traeai.com/#website\",\"name\":\"traeai\",\"url\":\"https://www.traeai.com\",\"description\":\"traeai 为开发者、研究员和内容团队筛选高质量 AI 技术内容,提供摘要、评分、趋势雷达与知识库产出。\",\"inLanguage\":[\"zh-CN\",\"en\"],\"publisher\":{\"@id\":\"https://www.traeai.com/#organization\"},\"potentialAction\":{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https://www.traeai.com/?q={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}},{\"@type\":\"SoftwareApplication\",\"@id\":\"https://www.traeai.com/#app\",\"name\":\"traeai\",\"url\":\"https://www.traeai.com\",\"description\":\"traeai 为开发者、研究员和内容团队筛选高质量 AI 技术内容,提供摘要、评分、趋势雷达与知识库产出。\",\"applicationCategory\":\"BusinessApplication\",\"operatingSystem\":\"Web\",\"availableLanguage\":[\"zh-CN\",\"en\"],\"offers\":{\"@type\":\"Offer\",\"price\":\"0\",\"priceCurrency\":\"USD\"},\"featureList\":[\"AI 技术内容筛选\",\"摘要与评分\",\"趋势雷达\",\"知识库素材库\",\"研究报告与社媒内容生成\"]}]}"])</script><script>self.__next_f.push([1,"5:[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://www.google.com\",\"crossOrigin\":\"anonymous\"}],[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://www.googletagmanager.com\",\"crossOrigin\":\"anonymous\"}],[\"$\",\"link\",null,{\"rel\":\"dns-prefetch\",\"href\":\"https://pagead2.googlesyndication.com\"}],[\"$\",\"link\",null,{\"rel\":\"dns-prefetch\",\"href\":\"https://zz.bdstatic.com\"}],[\"$\",\"link\",null,{\"rel\":\"alternate\",\"type\":\"text/plain\",\"title\":\"LLMs.txt\",\"href\":\"/llms.txt\"}],[\"$\",\"link\",null,{\"rel\":\"alternate\",\"type\":\"text/plain\",\"title\":\"LLMs Full Content Index\",\"href\":\"/llms-full.txt\"}]]}],[\"$\",\"body\",null,{\"className\":\"bg-slate-50 text-slate-950 antialiased selection:bg-cyan-100\",\"children\":[\"$L11\",[\"$\",\"script\",null,{\"type\":\"application/ld+json\",\"dangerouslySetInnerHTML\":{\"__html\":\"$12\"}}],[\"$\",\"$L13\",null,{\"async\":true,\"crossOrigin\":\"anonymous\",\"src\":\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9317462882514012\",\"strategy\":\"lazyOnload\"}],[\"$\",\"$L13\",null,{\"id\":\"baidu-push\",\"strategy\":\"lazyOnload\",\"children\":\"(function(){var bp=document.createElement('script');bp.src='https://zz.bdstatic.com/linksubmit/push.js';var s=document.getElementsByTagName(\\\"script\\\")[0];s.parentNode.insertBefore(bp,s);})();\"}],[[\"$\",\"$L13\",null,{\"async\":true,\"data-testid\":\"ga-loader\",\"src\":\"https://www.googletagmanager.com/gtag/js?id=G-L0D70NX8GR\",\"strategy\":\"afterInteractive\"}],[\"$\",\"$L13\",null,{\"data-testid\":\"ga-config\",\"id\":\"google-analytics\",\"strategy\":\"afterInteractive\",\"children\":\"\\n window.dataLayer = window.dataLayer || [];\\n function gtag(){dataLayer.push(arguments);}\\n gtag('js', new Date());\\n gtag('config', 'G-L0D70NX8GR');\\n \"}]]]}]]}]\n"])</script><script>self.__next_f.push([1,"14:I[30299,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"11:[\"$\",\"$L14\",null,{\"formats\":\"$undefined\",\"locale\":\"zh\",\"messages\":{\"nav\":{\"home\":\"首页\",\"daily\":\"今日\",\"topics\":\"专题\",\"entities\":\"实体\",\"stats\":\"数据看板\",\"bookmarks\":\"书签\",\"history\":\"历史\",\"workspace\":\"知识库\",\"myBrief\":\"我的简报\",\"settings\":\"设置\",\"signin\":\"登录\",\"more\":\"更多\",\"subscriptions\":\"订阅源\",\"sources\":\"来源\",\"recommendations\":\"为你推荐\",\"about\":\"关于\",\"privacy\":\"隐私\"},\"footer\":{\"tagline\":\"AI 内容雷达:多源订阅 · AI 摘要 · 跨材料深读 · Skill 知识库\",\"rss\":\"RSS\",\"openapi\":\"OpenAPI\",\"feedback\":\"反馈\",\"copyright\":\"© {year} traeai\",\"language\":\"语言\"},\"home\":{\"heroTitle\":\"你的 AI 内容雷达\",\"heroDescription\":\"多源 RSS / 公众号 / 播客 / 视频 自动入库 + AI 摘要 + 跨材料深读,专为 AI 创作者设计。\",\"ctaPrimary\":\"立即开始\",\"ctaSecondary\":\"了解更多\"},\"subscribe\":{\"heading\":\"每周精华简报\",\"description\":\"把本周最有用的 AI 内容打包送到你邮箱。每周日 06:30 北京时间一封,可一键退订。\",\"placeholder\":\"your@email.com\",\"button\":\"订阅\",\"submitting\":\"提交中…\",\"success\":\"已订阅,请到邮箱确认。\",\"alreadySubscribed\":\"已订阅,无需重复订阅。\",\"errorEmail\":\"邮箱格式不正确\",\"errorGeneric\":\"订阅失败,请稍后再试。\"},\"language\":{\"zh\":\"中文\",\"en\":\"English\",\"switchTo\":\"切换为 {label}\"},\"common\":{\"loading\":\"加载中…\",\"error\":\"出错了\",\"retry\":\"重试\",\"close\":\"关闭\",\"submit\":\"提交\",\"cancel\":\"取消\",\"today\":\"今天\",\"yesterday\":\"昨天\",\"featured\":\"精选\",\"followedSource\":\"关注源\",\"contentQuality\":\"内容质量\",\"contentQualityScore\":\"内容质量分 {score}\"},\"contentType\":{\"article\":\"文章\",\"podcast\":\"播客\",\"video\":\"视频\",\"tweet\":\"推文\",\"trending\":\"热榜\"},\"deepRead\":{\"highlightsHeading\":\"金句 / Highlights\",\"highlightsDescription\":\"值得收藏与分享的关键句。\",\"outlineHeading\":\"结构提纲\",\"outlineDescription\":\"按章节快速跳转。\",\"mindmapHeading\":\"思维导图\",\"mindmapDescription\":\"用一张图看清主题之间的关系。\"},\"scopeChat\":{\"heading\":\"跨材料问答\",\"placeholder\":\"比如:今天最值得关注的趋势是什么?这些材料里有哪些共同的判断?\",\"submit\":\"跨材料提问\",\"submitting\":\"AI 跨材料生成中…\",\"ariaLabel\":\"跨材料问题\",\"errorFallback\":\"请求失败\",\"citationsLabel\":\"引用材料\"},\"daily\":{\"heroEyebrow\":\"每日 AI 资讯雷达\",\"indexTitle\":\"每日 AI 资讯\",\"indexDescription\":\"按日期归档的 AI 内容,结合 AI 摘要与趋势分析。\",\"breadcrumbHome\":\"首页\",\"breadcrumbDaily\":\"每日 AI 资讯\"},\"weekly\":{\"heroEyebrow\":\"每周 AI 趋势雷达\",\"indexTitle\":\"精选周刊\",\"indexDescription\":\"按周回看最重要的 AI 与技术趋势,保留每期 AI 周报与引用材料。\",\"historyAria\":\"精选周刊历史\",\"cardTitle\":\"精选周刊\",\"dateRange\":\"至\",\"empty\":\"周报还在整理中,生成后会出现在这里。\",\"detailTitle\":\"精选周刊 {start} | traeai\",\"detailDescription\":\"{start} 至 {end} 的 traeai 精选周刊,基于 {count} 篇高信号内容生成。\",\"notFoundTitle\":\"周报不存在 | traeai\",\"notFoundDescription\":\"这期精选周刊暂时不存在或还没有生成。\"},\"articleDetail\":{\"unknownTime\":\"未知时间\",\"takeawayFallback\":\"要点\",\"exportMarkdown\":\"Markdown\",\"exportLlmsTxt\":\"AI 摘要\",\"podcast\":\"播客\",\"video\":\"视频\",\"playPodcast\":\"播放{title}\",\"playVideo\":\"播放{title}\",\"podcastPlayerPlaceholder\":\"当前版本先保留原播客入口;后续补齐音频地址后,会在这里加入播放器、章节和转录。\",\"openOriginalPodcast\":\"打开原播客收听\",\"audioDuration\":\"时长 {duration}\",\"audioPlayable\":\"可直接在线播放\",\"originalPodcastPage\":\"原播客页面\",\"podcastListenHeading\":\"播客收听\",\"readingMinutes\":\"{minutes} 分钟收听参考\",\"podcastNavLabel\":\"播客内容\",\"navOverview\":\"概览\",\"navChapters\":\"章节\",\"navTranscript\":\"转录\",\"navNotes\":\"笔记\",\"navAsk\":\"提问\",\"episodeTakeaways\":\"本集要点\",\"showSummaryHeading\":\"节目简介\",\"showSummaryFallback\":\"这期播客暂时没有简介。\",\"chaptersHeading\":\"章节\",\"transcriptHeading\":\"转录\",\"transcriptEmpty\":\"这期还没有可搜索转录。后续抓到带时间戳的内容后会自动补到这里。\",\"showNotesHeading\":\"节目笔记\",\"showNotesEmpty1\":\"这期播客暂时没有节目笔记。\",\"showNotesEmpty2\":\"你可以先打开原播客收听,后续会逐步补齐音频、章节和转录。\",\"openOriginalVideo\":\"打开原视频\",\"videoPlayable\":\"可直接观看的视频资源\",\"videoTakeaways\":\"视频要点\",\"videoSummaryHeading\":\"视频简介\",\"videoSummaryFallback\":\"这个视频暂时没有简介。\",\"videoNotesHeading\":\"视频笔记\",\"aiDeepDigest\":\"AI 深度提炼\",\"tldrHeading\":\"TL;DR · AI 摘要\",\"tldrLabel\":\"文章核心摘要\",\"keyTakeaways\":\"核心要点\",\"openOriginalArticle\":\"打开原文\",\"articleNoContent1\":\"这篇文章暂时没有正文缓存。\",\"articleNoContent2\":\"你可以先打开原文阅读,新的抓取任务会为后续文章保存完整正文。\"},\"personal\":{\"verifyingSession\":\"正在确认你的登录状态。\",\"verifying\":\"确认中\",\"signInToUnlock\":\"登录启用\",\"viewPublicBrief\":\"先看公共早报\",\"defaultPrimary\":\"打开知识库\",\"defaultSecondary\":\"浏览内容广场\",\"settings\":{\"title\":\"设置\",\"description\":\"登录后管理早报、周刊、订阅和账号偏好。\",\"signedIn\":\"设置页已经接入登录态。下一步会把早报、周刊、订阅和账号偏好写入这里。\",\"primary\":\"管理订阅入口\",\"secondary\":\"查看我的早报\"},\"bookmarks\":{\"title\":\"我的收藏\",\"description\":\"登录后保存你想反复阅读的内容,并把它们放进后续推荐和生成工作流。\",\"signedIn\":\"收藏区已经识别到你的登录状态。当前可先把内容保存到知识库,收藏表会在下一步接上。\",\"primary\":\"查看知识库素材\",\"secondary\":\"继续发现内容\"},\"history\":{\"title\":\"阅读历史\",\"description\":\"登录后会记录你读过的文章、播客、视频和推文,方便继续找回。\",\"signedIn\":\"阅读历史已经接入登录态。下一步会把文章详情页的阅读事件写入这里。\",\"primary\":\"继续阅读\",\"secondary\":\"打开知识库\"},\"myBrief\":{\"title\":\"我的早报\",\"description\":\"登录后根据你的订阅偏好生成个性化早报。没有订阅?先看看公共早报。\",\"signedIn\":\"根据你的订阅和偏好设置,每天为你筛选最相关的 AI 资讯。\",\"primary\":\"查看我的早报\",\"secondary\":\"查看公共早报\"},\"workspace\":{\"chromeClip\":\"Chrome 剪藏\"}},\"workspace\":{\"signInTitle\":\"知识库需要登录后使用\",\"signInBody\":\"登录后可以收集素材、编排 Skill、生成内容并保存历史。\",\"signInCta\":\"去登录\",\"loading\":\"加载中…\",\"untitledSession\":\"未命名会话\",\"fallbackPrefix\":\"当前使用 fallback 文案:\",\"fallbackDefault\":\"未配置 OPENAI_API_KEY 或调用失败\",\"fallbackSuffix\":\"。内容仅作骨架参考。\",\"networkError\":\"网络请求失败\",\"streamIncomplete\":\"流式响应未完成\",\"tabMaterials\":\"素材\",\"tabCollections\":\"收藏集\",\"tabHistory\":\"历史\",\"noCollections\":\"还没有收藏集,在知识库中创建\",\"typeArticle\":\"文章\",\"typePodcast\":\"播客\",\"typeVideo\":\"视频\",\"typeTweet\":\"推文\",\"typeTrend\":\"趋势\",\"typeTrending\":\"共振\",\"typeCustom\":\"自定义\",\"sidebarSearchPlaceholder\":\"搜索素材\",\"sidebarAddAria\":\"添加素材\",\"sidebarAddBtn\":\"添加\",\"quickUrlPlaceholder\":\"粘贴文章链接,回车添加素材\",\"emptyTitle\":\"开始创作\",\"emptyDescription\":\"在左侧添加文章、URL 或自定义内容作为素材,选好格式后点击生成。\",\"emptyAddMaterial\":\"添加素材\",\"sidebarFilterAll\":\"全部\",\"sidebarEmpty\":\"还没有素材。点击右上角「添加」开始收集内容。\",\"sidebarRemoveAria\":\"删除素材\",\"sidebarRemoveConfirm\":\"删除素材“{title}”?\",\"addDialogTitle\":\"添加素材\",\"addDialogTabUrl\":\"贴链接\",\"addDialogTabText\":\"粘贴正文\",\"addDialogUrlLabel\":\"文章 / 博客 / 新闻链接\",\"addDialogUrlHelp\":\"系统会尝试抓取正文并转为 Markdown 存入素材池。抓不到也会保留链接和标题。\",\"addDialogTitlePlaceholder\":\"标题\",\"addDialogBodyPlaceholder\":\"粘贴 Markdown 或纯文本...\",\"addDialogErrorUrlEmpty\":\"请填入链接\",\"addDialogErrorTitleBodyEmpty\":\"标题和正文不能为空\",\"addDialogCancel\":\"取消\",\"addDialogSubmit\":\"加入素材池\",\"addDialogSubmitting\":\"处理中…\",\"historyEmpty\":\"还没有历史,生成一次会自动保存。\",\"historyRemoveAria\":\"删除历史\",\"historyRemoveConfirm\":\"删除这条历史?\",\"editorThemeTitle\":\"切换主题\",\"editorCopy\":\"复制\",\"editorCopied\":\"已复制\",\"editorDownloadMd\":\"下载 .md\",\"editorPreview\":\"预览区\",\"editorSourceAria\":\"Markdown 源码\",\"editorPlaceholder\":\"生成内容会出现在这里,也可以直接编辑...\",\"versionHistory\":\"版本:\",\"restoreVersion\":\"恢复此版本\",\"distributeLabel\":\"分发\",\"distributeCopyFailed\":\"复制失败,请手动复制后打开{label}\",\"distributeWechatToast\":\"已复制,请在公众号后台新建文章后粘贴\",\"distributeWeiboToast\":\"已复制全文,请在微博编辑器中粘贴\",\"distributeOpenedToast\":\"已复制并打开{label}\",\"refinePlaceholderDisabled\":\"先生成一份初稿再追问\",\"refinePlaceholder\":\"追问或修改要求... (⌘/Ctrl + Enter 发送)\",\"refineSend\":\"发送\",\"refineSending\":\"发送中…\",\"skillBarSelectSkill\":\"选择 Skill\",\"skillBarSelectFormat\":\"选择格式\",\"skillBarBuiltin\":\"内置\",\"skillBarCustom\":\"自定义\",\"skillBarManage\":\"管理 / 新建 Skill…\",\"skillBarGenerate\":\"生成\",\"skillBarGenerating\":\"生成中…\",\"skillManagerMy\":\"我的 Skill\",\"skillManagerNew\":\"新建\",\"skillManagerEmpty\":\"还没有自定义 Skill。\",\"skillManagerDeleteAria\":\"删除 Skill\",\"skillManagerDeleteConfirm\":\"删除 Skill \\\"{name}\\\"?\",\"skillManagerEdit\":\"编辑 Skill\",\"skillManagerCreate\":\"新建 Skill\",\"skillManagerFieldName\":\"名称\",\"skillManagerNamePlaceholder\":\"例如:产品经理、学术写作...\",\"skillManagerFieldDescription\":\"描述(可选)\",\"skillManagerFieldInstructions\":\"Instructions(角色指令 / 基础原则)\",\"skillManagerInstructionsPlaceholder\":\"你是...\",\"skillManagerFormatsTitle\":\"Formats(格式模板)\",\"skillManagerAddFormat\":\"新增\",\"skillManagerFormatLabelPlaceholder\":\"格式名称\",\"skillManagerFormatTemplatePlaceholder\":\"输出要求、结构、风格...\",\"skillManagerDefaultFormatLabel\":\"默认格式\",\"skillManagerNewFormatLabel\":\"新格式\",\"skillManagerClose\":\"关闭\",\"skillManagerSave\":\"保存\",\"skillManagerSaving\":\"保存中…\",\"skillManagerCreateBtn\":\"创建\"},\"aiTools\":{\"heading\":\"工具箱\",\"subheading\":\"用 AI 把你阅读的文章转化为可变现的社交媒体内容。选择一个工具,输入素材,一键生成。\",\"group_社媒\":\"社交媒体\",\"group_长文\":\"长文写作\",\"group_视频\":\"视频创作\",\"moreTools\":\"更多工具\",\"cta\":\"💡 更多工具持续开发中 · 升级 Pro 解锁无限次生成\",\"clipTitle\":\"剪贴内容\",\"group_实用工具\":\"实用工具\",\"toolMdToPng\":\"Markdown 转图片\",\"toolMdToPngDesc\":\"粘贴 Markdown,实时预览排版,一键导出高清 PNG 图片。\",\"toolTextSlicer\":\"长文切片\",\"toolTextSlicerDesc\":\"把长文章自动切成多张适合社交平台的图片卡片。\",\"toolWordCount\":\"字数统计\",\"toolWordCountDesc\":\"实时统计中英文字数、字符数与预计阅读时间。\",\"toolCoverMaker\":\"封面生成\",\"toolCoverMakerDesc\":\"输入标题,选择模板,快速生成公众号或小报童封面图。\",\"mdToPng\":{\"inputLabel\":\"输入 · Markdown\",\"previewLabel\":\"预览 · 导出区域\",\"widthMobile\":\"📱 手机\",\"widthTablet\":\"📋 平板\",\"widthDesktop\":\"🖥 桌面\",\"themeLight\":\"浅色\",\"themeDark\":\"深色\",\"scale2x\":\"2x 清晰\",\"scale3x\":\"3x 超清\",\"scale1x\":\"1x 标准\",\"exportBtn\":\"导出 PNG\",\"exporting\":\"生成中…\",\"exportFail\":\"导出失败\"},\"textSlicer\":{\"inputPlaceholder\":\"粘贴长文内容…\",\"sliceBtn\":\"切片\",\"downloadAll\":\"全部下载\",\"downloadOne\":\"下载\",\"sliceCount\":\"{count} 张卡片\",\"emptyHint\":\"粘贴文字后点击「切片」\"},\"wordCount\":{\"inputPlaceholder\":\"在此输入或粘贴文本…\",\"chineseChars\":\"中文字数\",\"englishWords\":\"英文单词\",\"totalChars\":\"总字符\",\"charsNoSpace\":\"不含空格\",\"readingTime\":\"阅读时间\",\"minutes\":\"分钟\"},\"coverMaker\":{\"titlePlaceholder\":\"输入标题\",\"subtitlePlaceholder\":\"输入副标题(可选)\",\"templateLabel\":\"选择模板\",\"sizeLabel\":\"尺寸\",\"sizeWechat\":\"公众号 (900×500)\",\"sizeXiaobaoTong\":\"小报童 (750×422)\",\"exportBtn\":\"导出封面\",\"exporting\":\"生成中…\"},\"toolPlatformFormatter\":\"多平台排版\",\"toolPlatformFormatterDesc\":\"粘贴内容,一键生成小红书、微博、推特、微信四个平台的适配版本。\",\"platformFormatter\":{\"inputPlaceholder\":\"粘贴你的原始内容…\",\"convertBtn\":\"一键转换\",\"converting\":\"转换中…\",\"platformXiaohongshu\":\"小红书\",\"platformWeibo\":\"微博\",\"platformTwitter\":\"Twitter / X\",\"platformWechat\":\"微信公众号\",\"charCount\":\"{count} 字\",\"charLimit\":\"上限 {limit} 字\",\"noLimit\":\"无字数限制\",\"threadCount\":\"{count} 条推文\",\"truncated\":\"已截断\",\"copyBtn\":\"复制\",\"copied\":\"已复制\",\"polishBtn\":\"AI 润色\",\"polishing\":\"润色中…\",\"polishDone\":\"润色完成\",\"polishFail\":\"润色失败,已恢复原文\",\"showOriginal\":\"显示原版\",\"showPolished\":\"显示润色版\",\"hashtagsLabel\":\"标签\",\"emptyHint\":\"粘贴文字后点击「一键转换」\",\"selectAll\":\"全选\",\"deselectAll\":\"取消全选\"}},\"sources\":{\"title\":\"内容来源\",\"intro\":\"把优质博客、播客、视频和推文源加入你的订阅池,后续早报和推荐会优先读取它们。\",\"countSuffix\":\"{count} 个来源\",\"catalogCount\":\"已收录 {count} 个公开来源\",\"groupCountSuffix\":\"{count} 个\",\"searchAria\":\"搜索来源\",\"searchPlaceholder\":\"搜索来源名称或 RSS 地址\",\"typeAria\":\"类型\",\"typeAll\":\"全部类型\",\"typeArticle\":\"文章\",\"typePodcast\":\"播客\",\"typeVideo\":\"视频\",\"typeTweet\":\"推文\",\"submit\":\"筛选来源\",\"hint\":\"找到常读来源后点“关注”,会带着来源地址进入你的订阅设置;未登录时会先完成登录再回来。\",\"emptyGroup\":\"当前筛选下暂无来源。\",\"follow\":\"关注\"},\"sourceHealth\":{\"title\":\"来源健康\",\"intro\":\"看清哪些 RSS、播客、视频和推文源正在稳定产出,哪些需要替换、降频或修复。\",\"countSuffix\":\"{count} 个来源\",\"statusOk\":\"正常\",\"statusEmpty\":\"空源\",\"statusDegraded\":\"降级\",\"statusFailed\":\"异常\",\"typeArticle\":\"文章\",\"typePodcast\":\"播客\",\"typeVideo\":\"视频\",\"typeTweet\":\"推文\",\"typeTrending\":\"热榜\",\"noRecord\":\"暂无记录\",\"noSuccess\":\"暂无成功\",\"consecFailures\":\"连续失败 {count} 次\",\"imageCoverage\":\"图片覆盖\",\"contentCoverage\":\"内容入库\",\"signalDensity\":\"信号密度\",\"coverageQuality\":\"覆盖质量\",\"coverageTitle\":\"覆盖质量\",\"coverageIntro\":\"把抓取稳定性、入库转化、正文和图片覆盖合成一个来源质量视图,帮助识别高信号源和低信号噪音源。\",\"avgQuality\":\"平均质量\",\"highSignal\":\"高信号源\",\"healthyHighSignal\":\"稳定高信号\",\"lowSignal\":\"低信号源\",\"lastChecked\":\"最近检查\",\"lastSuccess\":\"最近成功\",\"fetchedInserted\":\"抓取 / 入库\",\"statAll\":\"全部\",\"previousPage\":\"上一页\",\"nextPage\":\"下一页\",\"pageStatus\":\"第 {page} / {totalPages} 页\",\"emptyTitle\":\"还没有来源健康记录\",\"emptyHint\":\"下一次抓取运行后,这里会出现每个来源的状态。\"},\"subscriptions\":{\"addSources\":\"添加来源\",\"affectsBody\":\"每日早报排序、个人推荐和内容筛选都会根据你的订阅偏好定制。\",\"affectsTitle\":\"订阅偏好影响什么\",\"creatorProfileTitle\":\"创作者口味\",\"audienceLabel\":\"目标读者\",\"audiencePlaceholder\":\"例如:关注 AI 产品和增长的一线从业者\",\"platformLabel\":\"发布平台\",\"toneLabel\":\"内容语气\",\"toneAnalytical\":\"克制分析\",\"tonePractical\":\"实用教程\",\"toneOpinionated\":\"鲜明观点\",\"riskLabel\":\"选题风险偏好\",\"riskConservative\":\"保守,只用强证据\",\"riskBalanced\":\"平衡\",\"riskExperimental\":\"探索,允许早期信号\",\"goalsLabel\":\"内容目标\",\"goalsPlaceholder\":\"涨粉, 建立专业可信度, 引导讨论\",\"editorialPromptLabel\":\"长期编辑要求\",\"editorialPromptPlaceholder\":\"例如:优先一手来源,不使用夸张标题,明确标注尚未确认的判断。\",\"emptyFeed\":\"还没有关注任何来源\",\"emptyFeedHint\":\"关注你感兴趣的来源后,这里会展示最近的文章\",\"excludeLabel\":\"排除词\",\"excludePlaceholder\":\"招聘, 融资, 课程广告\",\"feedDesc\":\"关注了 {count} 个来源,最近7天更新\",\"followedEmpty\":\"从来源库点击关注后,会先出现在这里。\",\"followedTitle\":\"已关注来源\",\"freqDaily\":\"每日\",\"freqDailyDesc\":\"适合默认早报节奏。\",\"freqLabel\":\"推送频率\",\"freqSixHourly\":\"每 6 小时\",\"freqSixHourlyDesc\":\"适合正在跟进的主题。\",\"freqWeekly\":\"每周\",\"freqWeeklyDesc\":\"适合低噪音回顾。\",\"interestLabel\":\"我想关注什么\",\"interestPlaceholder\":\"例如:帮我盯 AI 产品设计、Website-to-Video、Claude Design、内容工作流和可落地的工程实践。\",\"intro\":\"选择你关注的来源,设定兴趣关键词和排除词。每日早报和推荐内容会根据这些偏好为你定制。\",\"keywordsLabel\":\"关键词\",\"keywordsPlaceholder\":\"Claude Design, HeyGen, HyperFrames\",\"langAll\":\"不限\",\"langDesc\":\"偏好语言的文章会获得推荐加权。\",\"langEn\":\"偏好英文\",\"langLabel\":\"语言偏好\",\"langZh\":\"偏好中文\",\"loading\":\"正在加载订阅设置…\",\"pendingPrefix\":\"待加入来源:\",\"publicBriefCta\":\"先看公共早报\",\"samplesTitle\":\"源库样例\",\"save\":\"保存订阅设置\",\"saveError\":\"保存失败,请稍后再试。\",\"saved\":\"已保存,后续内容将按此偏好筛选。\",\"settingsBtn\":\"订阅设置\",\"settingsTitle\":\"订阅设置\",\"signInCta\":\"登录管理订阅\",\"signInDesc\":\"登录后关注来源,这里会展示你关注来源的最新内容\",\"signInIntro\":\"登录后自定义你的订阅:选择感兴趣的来源、关键词和推送频率,traeai 每天为你筛选最相关的内容。\",\"signInPrompt\":\"登录查看你的订阅内容\",\"sourceInfoBody\":\"源库覆盖 {count} 个入口,按来源类型分组追踪。\",\"sourceInfoTitle\":\"来源信息\",\"tabPreferences\":\"偏好设置\",\"tabSources\":\"关注来源\",\"title\":\"我的订阅\",\"titleEyebrow\":\"Subscription\",\"typeArticle\":\"文章\",\"typePodcast\":\"播客\",\"typeTrending\":\"热榜\",\"typeTweet\":\"推文\",\"typeVideo\":\"视频\"},\"recommendations\":{\"loading\":\"正在根据你的订阅偏好计算 personal_score。\",\"publicScore\":\"内容质量分 {score}\",\"fallbackSummary\":\"这条内容和你的订阅偏好有相关信号。\",\"personalScoreLabel\":\"个人相关度\",\"toWorkspace\":\"放进知识库\",\"signedOutTitle\":\"为你推荐\",\"signedOutBody\":\"登录后,我会根据你的订阅偏好给每条内容计算个人相关度。\",\"signInCta\":\"登录查看推荐\",\"needRadarTitle\":\"先设置订阅偏好\",\"needRadarBody\":\"写下你想长期关注的方向,我才能把公共高分内容变成你的个人推荐队列。\",\"openRadarCta\":\"设置我的订阅\",\"errorTitle\":\"推荐暂时不可用\",\"errorBody\":\"内容池读取失败,请稍后再试。\",\"eyebrow\":\"Personal Score\",\"title\":\"为你推荐\",\"intro\":\"保留内容质量分,同时按你的订阅偏好计算个人相关度。分数越高,越适合放进知识库继续产出。\"},\"opsDashboard\":{\"loading\":\"正在加载运营数据…\",\"missingConfig\":\"Supabase 浏览器配置缺失,无法访问运营报表。\",\"anonymousTitle\":\"运营报表\",\"anonymousBody\":\"请先登录,再以管理员身份访问。\",\"signIn\":\"登录\",\"forbiddenTitle\":\"无权访问\",\"forbiddenHint\":\"要把当前账号加入白名单,请把 Supabase user id 追加到 `ADMIN_USER_IDS` 环境变量(逗号分隔)。\",\"errorPrefix\":\"加载失败:\",\"title\":\"运营报表\",\"subtitle\":\"Chat / Skill / Export 调用量统计 · 数据生成于 {time}\",\"tableMissing\":\"尚未在 Supabase 中创建 `ops_events` 表,所有指标暂为 0。请执行最新的 schema.sql。\",\"exportLabel\":\"导出窗口:\",\"range1\":\"近 1 天\",\"range7\":\"近 7 天\",\"range30\":\"近 30 天\",\"range90\":\"近 90 天\",\"downloadCsv\":\"下载 CSV\",\"downloading\":\"下载中…\",\"statToday\":\"今日 (UTC)\",\"statLast7\":\"近 7 日\",\"statLast30\":\"近 30 日\",\"statTotal\":\"累计\",\"byType7d\":\"近 7 日按事件类型分布\",\"topArticles30d\":\"近 30 日 Top 文章\",\"noData\":\"暂无数据\",\"recent50\":\"最近 50 条事件\",\"colTime\":\"时间\",\"colType\":\"类型\",\"requestFailed\":\"请求失败\",\"downloadFailed\":\"下载失败\",\"forbiddenDefault\":\"无权访问\",\"typeChatMaterial\":\"单材料 Chat\",\"typeChatScope\":\"跨材料 Chat\",\"typeExportMarkdown\":\"导出 Markdown\",\"typeExportReadwise\":\"导出 Readwise\"},\"stats\":{\"metaTitle\":\"数据看板 · traeai\",\"metaDescription\":\"traeai 公开运营数据:累计入库的 AI 技术文章、订阅源、实体词条、近 14 天入库节奏与 Top 来源 / 实体。\",\"eyebrow\":\"公开数据看板\",\"title\":\"traeai 数据看板\",\"intro\":\"traeai 是一个面向 AI 技术从业者的多源资讯雷达,所有运营数据公开透明。下方统计来自实时数据库,每小时自动刷新。\",\"coreLabel\":\"核心数字\",\"totalArticles\":\"累计文章\",\"totalSources\":\"覆盖订阅源\",\"totalSourcesHint\":\"近 90 天活跃来源\",\"totalEntities\":\"实体词条\",\"totalEntitiesHint\":\"人物 / 公司 / 模型 / 论文 / 产品 / 概念\",\"last30d\":\"近 30 天新增\",\"last7d\":\"近 7 天新增\",\"dailyHeading\":\"近 14 天入库节奏\",\"dailyDescription\":\"共 {count} 篇 · 反映 traeai 的内容刷新速度。\",\"topSourcesHeading\":\"Top 来源(近 90 天)\",\"topSourcesDescription\":\"按入库文章数排序,点击跳转到来源筛选。\",\"topEntitiesHeading\":\"Top 实体\",\"topEntitiesDescription\":\"按关联文章数排序。\",\"noData\":\"暂无数据。\",\"generatedAt\":\"生成时间:{time} · 数据每小时刷新。\",\"datasetName\":\"traeai 内容雷达运营数据\",\"datasetKeywords\":\"AI 资讯, RSS 雷达, 运营数据, Open metrics\",\"varTotalArticles\":\"累计文章\",\"varTotalSources\":\"覆盖来源\",\"varTotalEntities\":\"实体词条\",\"varLast30d\":\"近 30 天新增文章\"},\"exploreLayout\":{\"groupYours\":\"你的\",\"groupPublic\":\"公共精选\",\"more\":\"更多\",\"primaryNavMyBrief\":\"我的早报\",\"primaryNavBrain\":\"知识库\",\"primaryNavAiTools\":\"工具箱\",\"primaryNavRecommendations\":\"为你推荐\",\"publicNavSquare\":\"内容广场\",\"publicNavBrief\":\"每日早报\",\"publicNavSources\":\"内容来源\",\"moreNavSubscriptions\":\"我的订阅\",\"moreNavBookmarks\":\"我的收藏\",\"moreNavHistory\":\"阅读历史\",\"moreNavWeekly\":\"精选周刊\",\"moreNavSourceHealth\":\"来源健康\",\"moreNavStats\":\"数据看板\",\"moreNavSettings\":\"设置\",\"moreNavAbout\":\"关于 traeai\",\"ariaPrimaryNav\":\"主导航\",\"ariaReadingNav\":\"阅读导航\",\"ariaMobileNav\":\"移动导航\",\"ariaHome\":\"traeai 首页\",\"mobileSquare\":\"广场\",\"mobileBrain\":\"知识库\",\"mobileBrief\":\"早报\",\"mobileMy\":\"我的\",\"heroBadge\":\"AI 内容 + 工具 + 创作平台\",\"heroTitle\":\"发现 AI 动态,用工具箱,做 AI 内容\",\"heroLead\":\"traeai 每天追踪全球 AI 领域的博客、播客、视频和推文,提供 AI 内容创作工具集,帮你从阅读到创作一站式完成。\",\"heroPrimary\":\"开始阅读\",\"heroSecondary\":\"打开知识库\",\"heroLearnMore\":\"了解更多 →\",\"heroPopular\":\"热门主题\",\"squareTitle\":\"今日精选\",\"squareCount\":\"AI 领域高质量内容精选 · 已收录 {count} 条\",\"ariaContentTypes\":\"内容类型\",\"tabAll\":\"全部\",\"tabArticle\":\"文章\",\"tabPodcast\":\"播客\",\"tabVideo\":\"视频\",\"tabTweet\":\"推文\",\"tabTrending\":\"热榜\",\"filterWeekly\":\"本周精选\",\"filterToday\":\"今日更新\",\"filterTop\":\"高分内容\",\"filtersBtn\":\"筛选\",\"sortLabel\":\"排序\",\"sortDefault\":\"默认\",\"sortLatest\":\"最新\",\"viewLabel\":\"视图\",\"viewListAria\":\"列表视图\",\"viewGridAria\":\"网格视图\",\"viewList\":\"列表\",\"viewGrid\":\"网格\",\"rightDailyTitle\":\"今日早报\",\"rightSeeAll\":\"查看全部\",\"rightWeeklyTitle\":\"精选周刊\",\"rightWeeklyDesc\":\"每周回看最值得跟进的 AI 技术信号。\",\"rightWeeklyCta\":\"查看周刊\",\"emptyTitle\":\"暂时还没有可展示的文章\",\"emptyHint\":\"试试放宽筛选条件,或稍后再来看看。\",\"digestPromoTitle\":\"traeai 精选周刊\",\"digestPromoDesc\":\"每周把过去 7 天的最高分内容、新出现的实体、值得读的播客整理成站内周报,支持随时回看历史。\",\"digestPromoPrimary\":\"查看周刊\",\"digestPromoSecondary\":\"今日简报\",\"collectionName\":\"traeai 今日更新\",\"personalizedHint\":\"已根据你的订阅偏好排序\",\"primaryNavAiMoney\":\"AI 赚钱\",\"heroPillarDiscover\":\"内容发现\",\"heroPillarDiscoverDesc\":\"博客、播客、视频、推文,每天精选高质量 AI 内容\",\"heroPillarTools\":\"工具箱\",\"heroPillarToolsDesc\":\"文章改写、摘要生成、多平台发布等 AI 创作工具\",\"heroPillarCreate\":\"知识管理\",\"heroPillarCreateDesc\":\"收藏、笔记、知识图谱,把内容变成你的知识库\",\"rightQuickTitle\":\"快捷入口\",\"rightQuickBrief\":\"今日早报\",\"rightQuickTools\":\"工具箱\",\"rightQuickSources\":\"内容来源\",\"rightHotTitle\":\"热门话题\",\"rightDailyDesc\":\"每天早上自动生成 AI 领域要闻摘要,助你快速掌握当日动态。\"},\"chrome\":{\"signIn\":\"登录\",\"signOut\":\"退出\",\"searchTrigger\":\"搜索内容、来源、标签\",\"searchTitle\":\"搜索 traeai\",\"searchSubtitle\":\"直接找文章,也可以跳到常用视图\",\"searchClose\":\"关闭搜索\",\"searchCloseOverlay\":\"关闭搜索遮罩\",\"searchInputLabel\":\"搜索内容\",\"searchInputPlaceholder\":\"搜索标题、摘要、来源或标签\",\"searchQuickAria\":\"快速搜索入口\",\"qlTodayLabel\":\"今日更新\",\"qlTodayHint\":\"最新入库\",\"qlTopLabel\":\"高分内容\",\"qlTopHint\":\"质量优先\",\"qlBriefLabel\":\"每日早报\",\"qlBriefHint\":\"摘要速读\",\"qlSourceHealthLabel\":\"来源健康\",\"qlSourceHealthHint\":\"抓取状态\"},\"pageMeta\":{\"about\":{\"title\":\"关于 traeai - AI 技术雷达 + 知识库\",\"description\":\"traeai 把全网 AI 领域高信号内容筛选、摘要、评分,再一键变成报告、笔记和社媒素材。\"},\"daily\":{\"title\":\"每日 AI 资讯雷达 | traeai\",\"description\":\"按日期回看 traeai 的 AI 技术与产品雷达:每日筛选、AI 摘要、要点和评分一目了然。\"},\"brief\":{\"title\":\"今日早报 | traeai\",\"description\":\"聚合今天最值得看的 AI 与技术内容,快速浏览摘要、要点与评分。\"},\"weekly\":{\"title\":\"精选周刊 | traeai\",\"description\":\"按周回看 traeai 生成的 AI 与技术趋势周报,每期都保留综述和引用材料。\"},\"sources\":{\"title\":\"来源库 | traeai\",\"description\":\"查看 traeai 持续跟踪的博客、播客、视频与推文来源,理解内容覆盖范围。\"},\"topics\":{\"title\":\"AI 技术专题库 | traeai\",\"description\":\"按 AI Agent、AI 编程、大模型基础设施、向量检索、AI 视频和机器人等专题浏览 traeai 精选内容。\"},\"entities\":{\"title\":\"实体雷达 | traeai\",\"description\":\"traeai 自动从最新 AI 资讯里抽取的关键实体(人物、公司、模型、论文、产品、概念)按热度聚合页。\"},\"recommendations\":{\"title\":\"为你推荐 | traeai\",\"description\":\"登录后查看个性化推荐内容。\"},\"subscriptions\":{\"title\":\"我的订阅 | traeai\",\"description\":\"登录后管理你的订阅来源。\"},\"sourceHealth\":{\"title\":\"来源健康 | traeai\",\"description\":\"来源健康监控页仅用于内部运维观察,不对搜索引擎开放索引。\"},\"workspace\":{\"title\":\"知识库 | traeai\",\"description\":\"登录后使用知识库整理素材并生成内容资产。\"},\"agent\":{\"title\":\"traeai Agent - AI 情报与内容执行助手\",\"description\":\"委派 AI 研究与内容任务,traeai Agent 会核对来源并交付文章、平台内容、图片和可编辑 PPT。\"},\"projects\":{\"title\":\"项目与记忆 | traeai Agent\",\"description\":\"管理 traeai Agent 的长期项目、任务上下文、记忆、产物和自动化。\"},\"aiTools\":{\"title\":\"工具箱 | traeai\",\"description\":\"用 AI 把文章转化为社交媒体帖子、公众号文章、视频方案,助你变现内容。\"},\"notes\":{\"title\":\"我的笔记 | traeai\",\"description\":\"在知识库中管理你的个人知识笔记。\"},\"bookmarks\":{\"title\":\"我的收藏 | traeai\",\"description\":\"登录后查看和管理你的收藏内容。\"},\"signin\":{\"title\":\"登录 | traeai\",\"description\":\"登录 traeai,管理你的订阅、知识库与个人阅读流程。\"},\"settings\":{\"title\":\"设置 | traeai\",\"description\":\"登录后管理你的账号、订阅与通知设置。\"},\"history\":{\"title\":\"阅读历史 | traeai\",\"description\":\"登录后查看你的阅读历史和继续阅读队列。\"},\"myBrief\":{\"title\":\"我的早报 | traeai\",\"description\":\"登录后查看和生成你的个性化早报。\"},\"adminOps\":{\"title\":\"运营报表 | traeai\",\"description\":\"Chat / Skill / Export 调用量统计(仅管理员可见)。\"},\"adminFeedback\":{\"title\":\"反馈管理 | traeai\",\"description\":\"用户反馈管理后台(仅管理员可见)。\"},\"privacy\":{\"title\":\"隐私政策 - traeai\",\"description\":\"traeai 与 traeai Chrome 扩展的隐私政策,说明保存网页、选中文本、账号登录和数据使用方式。\"},\"aiMoney\":{\"title\":\"AI 赚钱方法库 | traeai\",\"description\":\"从 YouTube 视频中提取的 AI 副业赚钱方法,涵盖无人出镜频道、AI SaaS、代理服务等多个赛道。\"},\"glossary\":{\"title\":\"AI 术语表 | traeai\",\"description\":\"全面的 AI 术语表与概念解释。覆盖人工智能领域的公司、模型、产品、人物、论文和核心概念。\"},\"compare\":{\"title\":\"AI 对比 | traeai\",\"description\":\"对比 AI 领域的模型、公司和产品。基于 500+ 信息源的真实报道数据。\"}},\"pageDynamic\":{\"dailyDateTitle\":\"AI 今日新闻 · {date}\",\"dailyDateTitleSuffix\":\"AI 今日新闻 · {date} | traeai\",\"dailyDateDescEmpty\":\"{date} 当日 traeai 收录的 AI 资讯雷达(暂无更新,明日再来)。\",\"dailyDateDescCount\":\"{date} 当日 traeai 收录 {count} 条 AI 技术与产品资讯,按评分排序,每条带 AI 摘要、要点与原文链接。\",\"dailyDateNotFoundTitle\":\"日期未找到 | traeai\",\"dailyDateNotFoundDesc\":\"这个日期不可用。\",\"topicNotFoundTitle\":\"专题未找到 | traeai\",\"topicNotFoundDesc\":\"这个专题暂时不可用。\",\"topicTitle\":\"{name} | traeai\",\"entityNotFoundTitle\":\"实体未找到 | traeai\",\"entityNotFoundDesc\":\"这个实体暂时没有入库内容。\",\"entityTitle\":\"{name} | {kind} | traeai\",\"entityDescFallback\":\"{name}({kind})在 traeai 上的最新讨论、相关材料与 AI 综述。\",\"glossaryNotFoundTitle\":\"AI 术语未找到 | traeai\",\"glossaryNotFoundDesc\":\"这个术语暂时没有收录。\",\"glossaryTitle\":\"什么是 {name}?| AI 术语表 | traeai\",\"glossaryDescFallback\":\"{name}({kind})是什么?阅读 traeai 对 {name} 的定义解释、最新动态和相关材料。\",\"compareNotFoundTitle\":\"对比页未找到 | traeai\",\"compareNotFoundDesc\":\"这个对比组合暂时无法生成。\",\"compareTitle\":\"{nameA} vs {nameB} | AI 对比 | traeai\",\"compareDesc\":\"{nameA} 和 {nameB} 有什么区别?基于 traeai 收录的真实报道数据,全面对比两者的特点、优势和最新动态。\"},\"aboutPage\":{\"eyebrow\":\"关于 traeai\",\"heroTitle\":\"每天 10 分钟,跟上 AI 领域真正重要的变化\",\"heroLead\":\"traeai 先替你读博客、播客、视频和推文,把高信号内容整理成摘要、评分、趋势,再一键变成研究报告、深读笔记和社媒素材。\",\"heroPrimary\":\"开始阅读\",\"heroSecondary\":\"打开知识库\",\"valuePropTitle\":\"为什么团队会反复打开 traeai\",\"valueRadarTitle\":\"雷达 · 不漏掉重要信号\",\"valueRadarDesc\":\"每天从博客、播客、视频、推文中筛出高质量内容,补足摘要 / 评分 / 标签。\",\"valueTrendTitle\":\"趋势 · 看见信息背后的变化\",\"valueTrendDesc\":\"把同主题的信号聚合成趋势线,帮你判断什么在升温、什么在降温。\",\"valueWorkspaceTitle\":\"知识库 · 从阅读到产出\",\"valueWorkspaceDesc\":\"勾选素材、选择能力(Skill),一键生成研究报告、深读笔记、社媒素材。\",\"audiencesTitle\":\"谁在用\",\"audiencePmTitle\":\"产品经理 / 创始人\",\"audiencePmDesc\":\"快速判断新技术和竞品动向,转成周报和汇报素材。\",\"audienceDevTitle\":\"研发 / 研究员\",\"audienceDevDesc\":\"聚焦领域内真正值得读的内容,沉淀成可复用的深读笔记。\",\"audienceCreatorTitle\":\"内容创作者\",\"audienceCreatorDesc\":\"从信号到推文、长文、视频脚本,一个知识库搞定。\",\"flowTitle\":\"从信号到产出,只要三步\",\"flowStep1Title\":\"订阅雷达\",\"flowStep1Desc\":\"从公共池选主题,或配置自己的信源组合。\",\"flowStep2Title\":\"阅读广场\",\"flowStep2Desc\":\"通过摘要、评分、趋势快速判断什么值得深读。\",\"flowStep3Title\":\"知识库产出\",\"flowStep3Desc\":\"勾选素材 + 选择 Skill,一键生成报告或笔记。\",\"flowCta\":\"开始使用知识库\"},\"privacyPage\":{\"eyebrow\":\"Privacy Policy\",\"heroTitle\":\"隐私政策\",\"heroLead\":\"本政策适用于 traeai 网站和 traeai Chrome 扩展。我们只在你主动使用相关功能时处理必要数据,用于把网页素材保存到你的 traeai 知识库,或通过 traeai AI 生成多平台分发草稿。\",\"lastUpdated\":\"最近更新:2026 年 4 月 24 日\",\"section1Title\":\"我们收集的信息\",\"section1Item1\":\"当你主动使用 traeai Chrome 扩展保存当前页面时,插件会发送页面标题、页面 URL 和保存时间。\",\"section1Item2\":\"当你主动使用“保存选中文本”时,插件会额外发送你在当前网页中选中的文字。\",\"section1Item3\":\"当你主动使用 AI 分发入口并选择目标平台时,插件会把页面标题、页面 URL 和页面正文或选中文本发送到 traeai API,用于生成对应平台草稿。\",\"section1Item4\":\"当你登录 traeai 时,网站会使用 Supabase 提供的认证会话来识别你的账号。\",\"section1Item5\":\"网站可能使用基础分析数据了解页面访问情况,用于改进产品体验。\",\"section2Title\":\"我们如何使用这些信息\",\"section2Item1\":\"把你主动保存的网页和选中文本写入你的 traeai 知识库。\",\"section2Item2\":\"在知识库中帮助你整理素材、生成摘要、改写内容和管理后续任务。\",\"section2Item3\":\"维护账号登录状态、排查错误并提升服务稳定性。\",\"section3Title\":\"Chrome 扩展的行为边界\",\"section3Item1\":\"插件不会在后台自动抓取网页内容。\",\"section3Item2\":\"插件不会读取你的浏览历史、密码、支付信息、通讯录或本地文件。\",\"section3Item3\":\"插件只在你点击保存按钮时处理当前页面信息或你选中的文本。\",\"section3Item4\":\"插件不会自动发布内容;AI 分发入口只生成草稿和打开目标平台,最终发布需要你在目标平台人工确认。\",\"section3Item5\":\"插件的可执行代码都随扩展包一起发布,不会从远程服务器下载并执行新的 JavaScript 代码。\",\"section4Title\":\"数据共享\",\"section4Item1\":\"我们不会出售你的个人数据。\",\"section4Item2\":\"我们不会把你保存的内容用于与 traeai 核心功能无关的广告、授信或转售用途。\",\"section4Item3\":\"为了提供服务,数据可能由 Supabase、Vercel 等基础设施服务商处理。\",\"section5Title\":\"数据控制\",\"section5Item1\":\"你可以在 traeai 知识库中管理自己保存的内容。\",\"section5Item2\":\"如果你希望删除账号相关数据或提出隐私问题,可以通过联系邮箱与我们沟通。\",\"contactTitle\":\"联系我们\",\"contactDesc\":\"如果你对隐私政策、数据删除或 Chrome 扩展的数据处理有问题,请使用 Chrome Web Store 开发者账号中公开的联系邮箱联系我们。\"},\"topics\":{\"heroEyebrow\":\"面向搜索的专题入口\",\"indexTitle\":\"AI 技术专题库\",\"indexDescription\":\"把动态资讯与深度研究组织成独立专题站,方便你按问题、技术方向和工作流持续追踪。\",\"viewContent\":\"查看精选内容\",\"breadcrumbTopics\":\"专题库\",\"radarEyebrow\":\"traeai 专题雷达\",\"searchIntent\":\"搜索用户通常想解决什么\",\"whyItMatters\":\"为什么值得持续追踪\",\"keywords\":\"关键词\",\"featuredContent\":\"精选内容\",\"featuredDescription\":\"按相关度、评分和更新时间筛出的可读内容。\",\"searchMore\":\"搜索更多\",\"emptyState\":\"这个专题正在等待更多高质量内容进入精选池。你可以先从相关专题继续阅读。\",\"relatedTopics\":\"相关专题\"},\"aiCompanion\":{\"title\":\"AI 伴读\",\"close\":\"关闭\",\"disclaimer\":\"仅基于本篇材料\",\"tryAsking\":\"试试问这些:\",\"prompt1\":\"这篇内容的核心观点是什么?\",\"prompt2\":\"对工程师来说有哪些可执行的启发?\",\"prompt3\":\"作者的论证有哪些可以质疑的地方?\",\"thinking\":\"AI 正在阅读材料并回答…\",\"requestFailed\":\"请求失败:\",\"inputPlaceholder\":\"向 AI 提问关于这篇内容的问题…\",\"send\":\"发送\"},\"brain\":{\"signInTitle\":\"知识库需要登录后使用\",\"signInBody\":\"登录后可以创建笔记、收集素材、整理知识。\",\"signInCta\":\"去登录\",\"notesTitle\":\"我的笔记\",\"newNote\":\"新建笔记\",\"searchNotes\":\"搜索笔记…\",\"noNotes\":\"还没有笔记\",\"noNotesHint\":\"点击右上角新建一条笔记,或从文章详情页保存\",\"backToNotes\":\"返回笔记\",\"saving\":\"保存中…\",\"togglePin\":\"置顶\",\"deleteNote\":\"删除笔记\",\"deleteConfirm\":\"确定要删除这条笔记吗?\",\"noteNotFound\":\"笔记不存在\",\"titlePlaceholder\":\"笔记标题\",\"bodyPlaceholder\":\"用 Markdown 写下你的想法…\",\"saveAsNote\":\"保存为笔记\",\"tabCreate\":\"创作\",\"tabNotes\":\"笔记\",\"tabCollections\":\"收藏集\",\"tabGraph\":\"图谱\",\"tabFeed\":\"知识库\",\"tabMaterials\":\"素材库\",\"untitledNote\":\"未命名笔记\",\"feedTitle\":\"知识动态\",\"feedEmpty\":\"还没有任何内容\",\"feedEmptyHint\":\"从首页收藏文章、写笔记或创作内容,这里会自动汇聚\",\"quickCapturePlaceholder\":\"记下一个想法…\",\"quickCaptureSave\":\"保存\",\"feedToday\":\"今日\",\"feedYesterday\":\"昨天\",\"feedThisWeek\":\"本周\",\"feedEarlier\":\"更早\",\"feedMaterial\":\"素材\",\"feedNote\":\"笔记\",\"feedSession\":\"创作\",\"searchPlaceholder\":\"搜索知识库…\",\"searching\":\"搜索中…\",\"searchNoResults\":\"没有找到匹配的内容\",\"searchResultCount\":\"找到 {count} 条结果\",\"collectionsTitle\":\"收藏集\",\"newCollection\":\"新建收藏集\",\"createCollection\":\"创建\",\"cancel\":\"取消\",\"collectionNamePlaceholder\":\"收藏集名称\",\"collectionDescPlaceholder\":\"描述(可选)\",\"noCollections\":\"还没有收藏集\",\"noCollectionsHint\":\"创建收藏集来分组整理你的素材和笔记\",\"deleteCollectionConfirm\":\"确定要删除这个收藏集吗?\",\"collectionNotFound\":\"收藏集不存在\",\"backToCollections\":\"返回收藏集\",\"emptyCollection\":\"收藏集是空的\",\"emptyCollectionHint\":\"从知识库动态或笔记中添加内容到收藏集\",\"addToCollection\":\"加入收藏集\",\"newCollectionQuick\":\"新建收藏集…\",\"modeEdit\":\"编辑\",\"modePreview\":\"预览\",\"filterAll\":\"全部\",\"graphEmpty\":\"还没有标签数据\",\"graphEmptyHint\":\"在笔记中使用 #标签 来构建知识图谱\",\"graphTagCloud\":\"标签云\",\"graphConnections\":\"标签关联\",\"graphTopNotes\":\"关联最多的笔记\"},\"sourceBrowser\":{\"title\":\"源库\",\"titleDesc\":\"从 {count} 个内容源中选择关注,精选内容将优先出现在你的订阅和每日简报中。\",\"searchPlaceholder\":\"搜索来源名称…\",\"filterAll\":\"全部\",\"filterArticle\":\"文章\",\"filterPodcast\":\"播客\",\"filterVideo\":\"视频\",\"filterTweet\":\"推文\",\"filterTrending\":\"热榜\",\"groupArticle\":\"文章源\",\"groupPodcast\":\"播客源\",\"groupVideo\":\"视频源\",\"groupTweet\":\"推文源\",\"groupTrending\":\"热榜源\",\"itemCount\":\"条\",\"follow\":\"关注\",\"following\":\"已关注\",\"followedCount\":\"已关注 {count} 个来源\",\"noResults\":\"没有找到匹配的来源。\",\"signInToFollow\":\"登录后可关注来源\",\"saving\":\"保存中…\",\"showMore\":\"显示全部 {count} 个\",\"showLess\":\"收起\",\"quickAddTitle\":\"从站内源快速添加\",\"quickAddDesc\":\"搜索本站已收录的来源,点击即可关注。\",\"quickAddPlaceholder\":\"输入来源名称搜索…\",\"quickAddEmpty\":\"没有匹配的未关注来源\",\"quickAddAllFollowed\":\"所有匹配来源均已关注\",\"customTitle\":\"自定义订阅源\",\"customDesc\":\"添加任意 RSS/Atom 源,也支持 OPML 文件批量导入。\",\"customToggle\":\"手动添加 RSS 链接\",\"customUrlPlaceholder\":\"粘贴 RSS 或 Atom 链接…\",\"customUrlInvalid\":\"请输入有效的 URL(以 http:// 或 https:// 开头)\",\"customUrlDuplicate\":\"该来源已在关注列表中\",\"customUrlSaveError\":\"保存失败,请稍后再试\",\"customAdd\":\"添加\",\"customRemove\":\"移除\",\"customList\":\"自定义来源({count})\",\"opmlImport\":\"导入 OPML\",\"opmlEmpty\":\"OPML 文件中没有找到 RSS 源\",\"opmlAllExist\":\"所有源已在关注列表中\",\"opmlSuccess\":\"成功导入 {added}/{total} 个源\",\"opmlSaveError\":\"保存失败,请稍后再试\",\"opmlParseError\":\"OPML 文件解析失败,请检查格式\"},\"feedback\":{\"title\":\"反馈\",\"close\":\"关闭\",\"placeholder\":\"告诉我们你的想法、遇到的问题,或功能建议…\",\"cat_bug\":\"🐛 Bug\",\"cat_feature\":\"💡 建议\",\"cat_content\":\"📰 内容\",\"cat_general\":\"💬 其他\",\"send\":\"发送\",\"sending\":\"发送中…\",\"contactPlaceholder\":\"联系方式(邮箱/微信,选填)\",\"success\":\"感谢你的反馈!✨\",\"error\":\"发送失败,请稍后再试\"},\"feedbackAdmin\":{\"title\":\"反馈管理\",\"loading\":\"加载中…\",\"missingConfig\":\"Supabase 配置缺失\",\"loginRequired\":\"需要登录\",\"loginHint\":\"请先登录管理员账号\",\"loginButton\":\"去登录\",\"forbidden\":\"当前账号无权访问反馈管理\",\"empty\":\"暂无反馈\",\"allStatus\":\"全部状态\",\"allCategory\":\"全部分类\",\"status_new\":\"新\",\"status_read\":\"已读\",\"status_resolved\":\"已解决\",\"status_archived\":\"已归档\",\"cat_bug\":\"Bug\",\"cat_feature\":\"建议\",\"cat_content\":\"内容\",\"cat_general\":\"其他\",\"action_new\":\"标为新\",\"action_read\":\"标为已读\",\"action_resolved\":\"标为已解决\",\"action_archived\":\"归档\",\"anonymous\":\"匿名用户\"},\"aiMoney\":{\"heading\":\"AI 赚钱方法库\",\"subheading\":\"从 500+ YouTube 视频中提取的结构化 AI 副业方法。每个方法包含流量获取、产品形态、定价策略和所需工具。\",\"featured\":\"精选\",\"productType\":\"产品类型\",\"sourceVideo\":\"来源视频\",\"statsMethods\":\"个方法\",\"statsCategories\":\"个赛道\",\"statsFeatured\":\"个精选\",\"emptyTitle\":\"即将上线\",\"emptyDescription\":\"AI 赚钱方法库正在数据采集中,敬请期待。我们将从 YouTube 热门视频中自动提取结构化的 AI 副业方法。\",\"cta\":\"💡 每月自动更新 · 数据来自 YouTube 热门 AI 赚钱视频\",\"searchPlaceholder\":\"搜索方法、工具、平台...\",\"filterAll\":\"全部\",\"showingResults\":\"展示 {count}/{total} 个方法\",\"noResults\":\"没有找到匹配的方法,试试其他关键词或筛选条件\",\"backToList\":\"返回方法库\",\"difficulty\":\"难度\",\"trafficPlatform\":\"流量平台\",\"trafficMethod\":\"获客方式\",\"salesPlatform\":\"销售平台\",\"priceRange\":\"价格区间\",\"businessModel\":\"商业模式\",\"toolsUsed\":\"所需 AI 工具\",\"toolCost\":\"工具成本\",\"operations\":\"运营要求\",\"niche\":\"推荐赛道\",\"logistics\":\"需要物流\",\"customerService\":\"需要客服\",\"sourceVideoSection\":\"来源视频\",\"contentArticle\":\"详细解析\"},\"authGate\":{\"title\":\"登录后查看完整内容\",\"description\":\"登录即可解锁完整的方法详情、工具列表和来源视频。\",\"signIn\":\"登录 / 注册\"},\"homeHero\":{\"titleLine1\":\"发现好内容\",\"titleLine2\":\"AI 帮你读懂全世界\",\"description\":\"从优质订阅源中自动筛选博客、播客、视频和推文,结合你的兴趣和阅读行为,每天整理真正适合你的高质量 AI 资讯。\",\"searchPlaceholder\":\"今天想了解什么 AI 资讯?\",\"searchButton\":\"AI 搜索\"},\"promotedServices\":{\"advertisementLabel\":\"推广\",\"eyebrow\":\"精选服务\",\"title\":\"更快用上 AI\",\"note\":\"充值为独立第三方服务\",\"rechargeLabel\":\"国内充值\",\"rechargeTitle\":\"ChatGPT / Codex 充值\",\"rechargeDescription\":\"无需 OpenAI 账号,按商品页说明下单交付。\",\"rechargeFrom\":\"低门槛体验\",\"rechargeOffer\":\"¥100 档标注 $200 额度\",\"rechargeCta\":\"查看充值优惠\"},\"feedCard\":{\"readTime\":\"{min} 分钟阅读\",\"typeArticle\":\"资讯\",\"typePodcast\":\"播客\",\"typeVideo\":\"视频\",\"typeTweet\":\"推文\",\"typeTrending\":\"趋势\"},\"leftNav\":{\"navHome\":\"情报库\",\"navBrief\":\"每日情报\",\"navAgent\":\"任务\",\"navBrain\":\"项目与记忆\",\"navDiscover\":\"情报库\",\"navArtifacts\":\"产物\",\"navAiTools\":\"工具箱\",\"navAiMoney\":\"AI 赚钱\",\"navRecommend\":\"为你推荐\",\"navTopics\":\"专题\",\"navGuides\":\"搜索指南\",\"navStats\":\"数据追踪\",\"navSources\":\"来源\",\"navSubscriptions\":\"我的订阅\",\"navLearn\":\"学 AI\",\"navSettings\":\"设置\",\"collapse\":\"收起侧边栏\",\"expand\":\"展开侧边栏\"},\"agent\":{\"signInTitle\":\"登录你的个人创作工作台\",\"signInBody\":\"发现今日选题、调用知识库完成创作,并把成稿与视觉素材沉淀为个人内容资产。\",\"signInCta\":\"登录并开始创作\",\"newTask\":\"新建任务\",\"newCreation\":\"开始创作\",\"todayOverview\":\"今日总览\",\"recentTasks\":\"最近任务\",\"recentCreations\":\"最近任务\",\"noTasks\":\"还没有任务记录。创建第一个研究或内容任务。\",\"noCreations\":\"还没有任务记录,先委派一个结果目标。\",\"workspaceTitle\":\"traeai Agent\",\"creationAssistant\":\"Agent 任务\",\"dashboardTitle\":\"你想让 Agent 完成什么?\",\"dashboardSubtitle\":\"给出结果目标。Agent 会检索高信号情报、核对来源,并交付可编辑的内容、图片或 PPT。\",\"signalsReady\":\"{count} 条选题已就绪\",\"completion\":\"今日完成度 {percent}%\",\"todayProgress\":\"今日进度\",\"completedCount\":\"已完成 {done}/{total}\",\"dailyPlan\":\"今日计划\",\"planTopic\":\"确定今日选题\",\"planDraft\":\"完成一篇主稿\",\"planPublish\":\"发布到一个平台\",\"contentAssets\":\"已完成任务\",\"savedCreations\":\"个任务已保存\",\"guestAssetHint\":\"登录后保存任务、记忆与产物\",\"startCreating\":\"开始创作\",\"confirmGenerate\":\"确认生成\",\"briefDraftHint\":\"简报草稿已载入,可编辑后确认生成\",\"quickCreate\":\"委派任务\",\"quickAction1Title\":\"研究今日变化\",\"quickAction1Desc\":\"核对最新信号,给出判断、证据和可做选题\",\"quickAction2Title\":\"制作全平台内容包\",\"quickAction2Desc\":\"生成母稿、平台成稿、封面和配图\",\"quickAction3Title\":\"完成深度长文\",\"quickAction3Desc\":\"从一手来源研究到可发布的完整文章\",\"quickAction4Title\":\"制作小红书图文\",\"quickAction4Desc\":\"完成标题、正文和 6 页视觉内容\",\"quickAction5Title\":\"生成视觉素材\",\"quickAction5Desc\":\"基于内容制作封面、配图或信息图\",\"quickAction6Title\":\"制作可编辑 PPT\",\"quickAction6Desc\":\"研究主题并交付 16:9 原生 PPTX\",\"todayTopics\":\"今日高信号选题\",\"viewBrief\":\"查看完整简报\",\"sourceCount\":\"{count} 个来源\",\"createFromTopic\":\"以此创作\",\"createFromStory\":\"以“{title}”开始创作\",\"storyPrompt\":\"围绕“{title}”检索可靠材料,先给出适合自媒体创作的 3 个内容角度,再推荐最值得做的一个并生成结构化初稿。\",\"topicsEmpty\":\"今日选题正在整理中\",\"ready\":\"已就绪\",\"emptyTitle\":\"今天要完成什么?\",\"emptyBody\":\"给出一个目标,Agent 会核对来源、阅读相关材料,并交付可直接发布的内容与视觉资产。\",\"quickToday\":\"分析今天最值得关注的 AI 动态,给出 3 个内容选题\",\"quickPackage\":\"从今天的 AI 内容中选出最值得讲的一件,生成证据卡、结构化母稿、公众号、小红书、X 和微博成稿;图片工具可用时生成公众号封面和小红书首图\",\"quickWechat\":\"从近期 AI 新闻中选择一个主题,写成可直接发布的公众号文章\",\"quickXhs\":\"整理一个 AI 工具趋势,生成小红书图文文案和 6 页配图方案\",\"quickVisual\":\"围绕近期最值得关注的 AI 主题,先核对来源并提炼一个核心观点,再生成适合发布的封面和信息图\",\"quickPpt\":\"研究近期最值得讲的 AI 行业变化,引用可靠来源,制作一份 10 页、16:9、可编辑的中文 PPTX\",\"placeholder\":\"描述任务,Enter 发送,Shift + Enter 换行\",\"projectLabel\":\"选择项目\",\"projectNone\":\"不使用项目\",\"projectHint\":\"项目会为任务提供固定指令和长期记忆\",\"modelLabel\":\"选择模型\",\"modelAuto\":\"自动\",\"modelHint\":\"自动模式会根据任务选择可用模型,并在调用失败时切换\",\"send\":\"发送任务\",\"stop\":\"停止执行\",\"statusPlanning\":\"正在理解任务并规划步骤\",\"toolSearch\":\"搜索 traeai 知识库\",\"toolRead\":\"读取相关原文\",\"toolImage\":\"使用 gpt-image-2 生成配图\",\"toolPresentation\":\"提交原生 PPT 生成任务\",\"imageReady\":\"图片生成已就绪\",\"toolGeneric\":\"调用受控工具\",\"execution\":\"执行过程\",\"executionEmpty\":\"Agent 开始执行后,这里会显示检索和工具步骤。\",\"sources\":\"引用材料\",\"sourcesEmpty\":\"检索到的知识库材料会显示在这里。\",\"sourceRolePrimary\":\"一手来源\",\"sourceRoleResearch\":\"研究证据\",\"sourceRoleMedia\":\"媒体报道\",\"sourceRoleExpert\":\"专家观点\",\"sourceRoleDiscovery\":\"发现线索\",\"editorialScore\":\"traeai 编辑评分,不代表来源真实性\",\"scoreShort\":\"编辑分\",\"deliverable\":\"交付物\",\"deliverableEmpty\":\"任务完成后,可编辑结果会保存到这里。\",\"presentationMeta\":\"{count} 页 · 16:9 · 可编辑 PPTX\",\"presentationProgress\":\"PPT 生成进度\",\"downloadPptx\":\"下载 PPTX\",\"presentationStatus\":{\"queued\":\"排队中\",\"running\":\"生成中\",\"validating\":\"检查中\",\"completed\":\"已完成\",\"failed\":\"生成失败\",\"cancelled\":\"已取消\"},\"presentationStage\":{\"queued\":\"等待独立生成 Worker\",\"preparing\":\"准备材料\",\"generating\":\"正在生成页面\",\"validating\":\"正在检查 PPTX\",\"completed\":\"文件已就绪\",\"failed\":\"任务未完成\",\"cancelled\":\"任务已取消\"},\"copy\":\"复制\",\"copied\":\"已复制\",\"editableDraft\":\"可编辑草稿\",\"saveWork\":\"保存作品\",\"savingWork\":\"保存中…\",\"workSaved\":\"作品已保存\",\"workSaveError\":\"保存作品失败\",\"savedWorkDefaultTitle\":\"Agent 作品\",\"saveAsSkill\":\"保存为 Skill\",\"savingSkill\":\"保存中…\",\"skillSaved\":\"已保存为 Skill\",\"skillSaveError\":\"保存 Skill 失败\",\"savedSkillName\":\"Agent 工作流:{task}\",\"savedSkillDescription\":\"从一次完成的 Agent 任务保存的可复用工作流。\",\"savedSkillFormat\":\"默认交付\",\"savedSkillInstructions\":\"复用这次任务的目标、证据要求和交付方式。先核对来源,再按示例产出完整结果。\",\"authRequired\":\"登录状态已失效,请重新登录\",\"loadError\":\"无法加载任务\",\"runError\":\"Agent 执行失败\",\"stopped\":\"任务已停止\",\"quotaBlockedBody\":\"当前额度或套餐限制已达到。\",\"quotaBlockedAction\":\"查看套餐并升级\"},\"projects\":{\"title\":\"项目与记忆\",\"subtitle\":\"让一组任务共享目标、固定指令、长期记忆和产物。\",\"newProject\":\"新建项目\",\"namePlaceholder\":\"项目名称\",\"descriptionPlaceholder\":\"项目目标\",\"instructionsPlaceholder\":\"Agent 固定指令\",\"create\":\"创建项目\",\"saving\":\"保存中…\",\"saveError\":\"保存失败\",\"loadError\":\"无法加载项目\",\"authRequired\":\"登录状态已失效\",\"guestBody\":\"登录后创建长期项目,让 Agent 记住目标、风格、决策与历史产物。\",\"signIn\":\"登录并管理项目\",\"emptyBody\":\"还没有项目。创建一个内容栏目、客户项目或研究主题。\",\"noDescription\":\"暂未填写项目目标\",\"selectHint\":\"选择一个项目查看任务、记忆和产物\",\"useProject\":\"用此项目开始任务\",\"tasks\":\"任务\",\"artifacts\":\"产物\",\"memories\":\"记忆\",\"automations\":\"自动化\",\"instructions\":\"项目固定指令\",\"instructionsEmpty\":\"未设置固定指令。新任务只会使用项目记忆。\",\"memoryTitle\":\"长期记忆\",\"memoryInstruction\":\"指令\",\"memoryPreference\":\"偏好\",\"memoryFact\":\"事实\",\"memoryDecision\":\"决策\",\"memoryNamePlaceholder\":\"记忆标题\",\"memoryContentPlaceholder\":\"例如:文章语气克制,所有数据必须引用一手来源。\",\"saveMemory\":\"保存记忆\",\"memoryEmpty\":\"还没有长期记忆。\",\"automationTitle\":\"自动化定义\",\"automationBody\":\"按计划自动交给 Agent 执行;每次运行都会计入套餐配额和创作点。\",\"automationNamePlaceholder\":\"自动化名称\",\"automationPromptPlaceholder\":\"每次运行时交给 Agent 的完整任务\",\"scheduleManual\":\"手动\",\"scheduleDaily\":\"每天\",\"scheduleWeekly\":\"每周\",\"scheduleMonthly\":\"每月\",\"runTime\":\"运行时间\",\"weekday\":\"星期\",\"monthDay\":\"每月日期\",\"timezone\":\"时区\",\"approvalMode\":\"审批模式\",\"approvalAuto\":\"自动执行\",\"approvalRequired\":\"每次需批准\",\"dayOfMonth\":\"每月 {day} 日\",\"enableAfterSave\":\"保存后启用\",\"maxAttempts\":\"最多尝试\",\"saveAutomation\":\"保存自动化\",\"automationEmpty\":\"还没有自动化定义。\",\"nextRun\":\"下次 {time}\",\"pauseAutomation\":\"暂停自动化\",\"activateAutomation\":\"启用自动化\",\"runNow\":\"立即运行\",\"awaitingApproval\":\"本次任务等待批准\",\"approveRun\":\"批准运行\",\"rejectRun\":\"拒绝运行\",\"latestRun\":\"最近运行\",\"attemptCount\":\"第 {attempt}/{max} 次尝试\",\"recentTasks\":\"最近任务\",\"recentArtifacts\":\"最近产物\",\"tasksEmpty\":\"还没有归属此项目的任务。\",\"artifactsEmpty\":\"任务完成后,产物会出现在这里。\",\"schedule\":{\"manual\":\"手动\",\"daily\":\"每天\",\"weekly\":\"每周\",\"monthly\":\"每月\"},\"status\":{\"active\":\"已启用\",\"paused\":\"已暂停\",\"archived\":\"已归档\"},\"runStatus\":{\"queued\":\"排队中\",\"running\":\"执行中\",\"completed\":\"已完成\",\"failed\":\"失败\",\"cancelled\":\"已取消\"},\"weekdays\":{\"1\":\"周一\",\"2\":\"周二\",\"3\":\"周三\",\"4\":\"周四\",\"5\":\"周五\",\"6\":\"周六\",\"7\":\"周日\"}},\"rightPanel\":{\"hotTopics\":\"实时热点\",\"trendingTools\":\"趋势工具\",\"seeAll\":\"查看全部\",\"dailyTip\":\"今日提示\",\"tipContent\":\"最新内容信号还在刷新中,稍后会基于高分文章自动生成提示。\",\"tipFrom\":\"来自 {source}\",\"tipExpand\":\"查看具体操作\",\"tipStep1\":\"1. 打开 ChatGPT → 设置 → 个性化 → 自定义指令\",\"tipStep2\":\"2. 在「关于你自己」中描述你的领域和风格\",\"tipStep3\":\"3. 在「ChatGPT 如何回应」中设定输出格式\",\"tipCollapse\":\"收起\",\"noSignals\":\"暂无实时话题信号\",\"noToolSignals\":\"暂无工具趋势信号\",\"todayStats\":\"今日数据\",\"statArticles\":\"新增资讯\",\"statVideos\":\"新增视频\",\"statPodcasts\":\"新增播客\",\"statTweets\":\"新增推文\",\"greetingNight\":\"夜深了\",\"greetingMorning\":\"早上好\",\"greetingAfternoon\":\"下午好\",\"greetingEvening\":\"晚上好\",\"toolCursor\":\"AI 代码编辑器\",\"toolBolt\":\"AI 全栈开发\",\"toolRunway\":\"4K AI 视频生成\",\"toolNotebook\":\"Google AI 笔记\",\"tagEditor\":\"编辑器\",\"tagDev\":\"开发\",\"tagVideo\":\"视频\",\"tagNote\":\"笔记\",\"linkBrief\":\"简报\",\"linkSubs\":\"订阅\",\"linkAbout\":\"关于\"},\"aiBar\":{\"ph1\":\"向 traeai 提问任何事情...\",\"ph2\":\"搜索今日 AI 资讯、工具、教程...\",\"ph3\":\"帮我找 OpenAI 最新动态\",\"ph4\":\"推荐适合新手的 AI 赚钱方法\",\"ph5\":\"AI 视频生成工具有哪些?\",\"disclaimer\":\"AI 可能会生成不准确的信息,请核实重要内容\",\"thinking\":\"正在思考...\",\"answer\":\"AI 回答\",\"sources\":\"引用来源\",\"errorGeneric\":\"请求失败,请稍后重试\",\"errorNetwork\":\"网络错误,请检查连接\"}},\"now\":\"$undefined\",\"timeZone\":\"UTC\",\"children\":\"$L15\"}]\n"])</script><script>self.__next_f.push([1,"15:[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"9:null\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"title\",\"0\",{\"children\":\"How to Find and Fix Common Technical SEO Issues on Your Website | freeCodeCamp.org | traeai\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"freeCodeCamp.org发布 (评分 7.1/100) How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built... 主题聚...\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"3\",{\"name\":\"robots\",\"content\":\"index, follow\"}],[\"$\",\"meta\",\"4\",{\"name\":\"theme-color\",\"content\":\"#0f172a\"}],[\"$\",\"meta\",\"5\",{\"name\":\"citation_title\",\"content\":\"How to Find and Fix Common Technical SEO Issues on Your Website\"}],[\"$\",\"meta\",\"6\",{\"name\":\"citation_author\",\"content\":\"freeCodeCamp.org\"}],[\"$\",\"meta\",\"7\",{\"name\":\"citation_publication_date\",\"content\":\"2026-11-03\"}],[\"$\",\"meta\",\"8\",{\"name\":\"citation_online_date\",\"content\":\"2026-11-04\"}],[\"$\",\"meta\",\"9\",{\"name\":\"citation_publisher\",\"content\":\"traeai\"}],[\"$\",\"meta\",\"10\",{\"name\":\"citation_public_url\",\"content\":\"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b\"}],[\"$\",\"meta\",\"11\",{\"name\":\"citation_abstract\",\"content\":\"How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built...\"}],[\"$\",\"meta\",\"12\",{\"name\":\"ai-summary\",\"content\":\"How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built... | Key takeaways: 主题聚焦:How to Find and Fix Common Technical SEO Issues ; 来源:freeCodeCamp.org,建议结合原文判断细节。; AI 分析暂不可用,本条为保底评分与摘要。\"}],[\"$\",\"link\",\"13\",{\"rel\":\"canonical\",\"href\":\"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b\"}],[\"$\",\"meta\",\"14\",{\"name\":\"baidu-site-verification\",\"content\":\"codeva-ja4cLJUfVw\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:title\",\"content\":\"How to Find and Fix Common Technical SEO Issues on Your Website | freeCodeCamp.org | traeai\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:description\",\"content\":\"freeCodeCamp.org发布 (评分 7.1/100) How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built... 主题聚...\"}],[\"$\",\"meta\",\"17\",{\"property\":\"og:url\",\"content\":\"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b\"}],[\"$\",\"meta\",\"18\",{\"property\":\"og:site_name\",\"content\":\"traeai\"}],[\"$\",\"meta\",\"19\",{\"property\":\"og:locale\",\"content\":\"zh_CN\"}],[\"$\",\"meta\",\"20\",{\"property\":\"og:image\",\"content\":\"https://www.traeai.com/og.png\"}],[\"$\",\"meta\",\"21\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"22\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"23\",{\"property\":\"og:image:alt\",\"content\":\"How to Find and Fix Common Technical SEO Issues on Your Website\"}],[\"$\",\"meta\",\"24\",{\"property\":\"og:type\",\"content\":\"article\"}],[\"$\",\"meta\",\"25\",{\"property\":\"article:published_time\",\"content\":\"2026-11-03T19:00:29+00:00\"}],[\"$\",\"meta\",\"26\",{\"property\":\"article:modified_time\",\"content\":\"2026-11-04T02:53:14.917689+00:00\"}],[\"$\",\"meta\",\"27\",{\"property\":\"article:author\",\"content\":\"freeCodeCamp.org\"}],[\"$\",\"meta\",\"28\",{\"property\":\"article:tag\",\"content\":\"AI\"}],[\"$\",\"meta\",\"29\",{\"property\":\"article:tag\",\"content\":\"编程\"}],[\"$\",\"meta\",\"30\",{\"property\":\"article:tag\",\"content\":\"前端\"}],[\"$\",\"meta\",\"31\",{\"property\":\"article:tag\",\"content\":\"后端\"}],[\"$\",\"meta\",\"32\",{\"property\":\"article:tag\",\"content\":\"安全\"}],[\"$\",\"meta\",\"33\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"34\",{\"name\":\"twitter:title\",\"content\":\"How to Find and Fix Common Technical SEO Issues on Your Website | freeCodeCamp.org | traeai\"}],[\"$\",\"meta\",\"35\",{\"name\":\"twitter:description\",\"content\":\"freeCodeCamp.org发布 (评分 7.1/100) How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built... 主题聚...\"}],[\"$\",\"meta\",\"36\",{\"name\":\"twitter:image\",\"content\":\"https://www.traeai.com/og.png\"}],[\"$\",\"link\",\"37\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?8651e00f8b58c68f\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],\"$L16\",\"$L17\",\"$L18\"]\n"])</script><script>self.__next_f.push([1,"19:I[17932,[],\"IconMark\"]\n16:[\"$\",\"link\",\"38\",{\"rel\":\"icon\",\"href\":\"/icon.png?1e1a7ef1b4bebcf3\",\"type\":\"image/png\",\"sizes\":\"48x48\"}]\n17:[\"$\",\"link\",\"39\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-icon.png?e64c85988942fb66\",\"type\":\"image/png\",\"sizes\":\"128x128\"}]\n18:[\"$\",\"$L19\",\"40\",{}]\n"])</script><script>self.__next_f.push([1,"1a:T9076,"])</script><script>self.__next_f.push([1,"{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b#article\",\"url\":\"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b\",\"headline\":\"How to Find and Fix Common Technical SEO Issues on Your Website\",\"abstract\":\"How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built...\",\"description\":\"freeCodeCamp.org发布 (评分 7.1/100) How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built... 主题聚...\",\"datePublished\":\"2026-11-03T19:00:29+00:00\",\"dateModified\":\"2026-11-04T02:53:14.917689+00:00\",\"inLanguage\":\"英文\",\"keywords\":\"AI, 编程, 前端, 后端, 安全\",\"wordCount\":5733,\"timeRequired\":\"PT23M\",\"citation\":\"https://www.freecodecamp.org/news/fix-common-technical-seo-issues/\",\"isBasedOn\":\"https://www.freecodecamp.org/news/fix-common-technical-seo-issues/\",\"about\":[{\"@type\":\"Thing\",\"name\":\"AI\"},{\"@type\":\"Thing\",\"name\":\"编程\"},{\"@type\":\"Thing\",\"name\":\"前端\"},{\"@type\":\"Thing\",\"name\":\"后端\"},{\"@type\":\"Thing\",\"name\":\"安全\"}],\"isAccessibleForFree\":true,\"articleBody\":\"# 如何发现并修复网站上的常见技术SEO问题\\n\\n2026年11月3日\\n\\n/\\n\\n#SEO\\n\\nSaar Twito\\n\\n假设你已经搭建了一个网站。你投入了设计,购买了域名,等等。但网站不仅仅是屏幕上看到的内容。幕后还有很多事情在发生。你需要了解互联网的工作原理,以及搜索引擎优化(SEO)的运作方式。\\n\\n速度也是其中的关键部分。一个加载缓慢的网站可能会有非常弱的SEO效果,因为大多数人不会花太多时间等待页面加载,尤其是在现在这个时代。\\n\\n网站速度是一个广为人知的话题,本身有许多需要考虑的问题,例如最大内容绘制(LCP)、累积布局偏移(CLS)和服务器速度。但我会在另一篇文章中详细讨论这些内容。\\n\\n本文重点介绍阻止搜索引擎访问和读取你页面的问题。\\n\\n在我看来,技术SEO比常规SEO(侧重于内容和关键词)更难实施。技术方面通常需要开发者的知识,如果没有技术背景,可能需要进行一些令人不太舒服的更改。\\n\\n技术问题可能在数月内都未被发现,因为通常你看不到它。这不是设计问题。你只有在运行特定检查时才能发现它,例如使用Google PageSpeed Insights。\\n\\n在本教程中,你将发现并修复小型练习网站上最常见的问题。我不想使用真实网站并让其所有者感到尴尬,因此我搭建了一个已经包含这些问题的练习网站。\\n\\n## 目录\\n\\n- 先决条件\\n\\n- 什么是技术SEO?\\n\\n- 这些问题在真实网站上有多常见?\\n\\n- 如何设置练习网站\\n\\n- 如何检查页面的HTTP状态码 什么是软404?\\n\\n- 如何发现并修复重定向链\\n\\n- 如何确保robots.txt没有阻止重要页面\\n\\n- 如何发现意外的noindex 如何检查robots元标签 如何检查X-Robots-Tag头\\n\\n- 如何正确使用规范标签\\n\\n- 如何修复缺失和重复的标题和元描述\\n\\n- 如何使链接可爬取\\n\\n- 如何检查内容是否需要JavaScript才能显示\\n\\n- 五分钟内能否检查页面?\\n\\n- 结论\\n\\n## 先决条件\\n\\n你不需要是经验丰富的程序员也能跟上教程。你需要:\\n\\n- 一个网络浏览器,如Chrome、Firefox、Edge或Safari。在Safari中,首先在“设置”\u003e“高级”中启用“显示Web开发者功能”。\\n\\n- 一个终端:macOS上的终端,Windows上的PowerShell,或Linux上的任何终端。\\n\\n- curl,一个下载网页的小程序。它包含在macOS、大多数Linux发行版以及Windows 10(1803版本及更高版本)和Windows 11中。\\n\\n- Node.js,用于运行练习网站。代码在Node.js 26.8和curl 8.7上进行了测试。\\n\\n在Windows PowerShell中,使用curl.exe而不是curl,因为在Windows中curl是另一个命令的快捷方式。将 | grep -i \\\"text\\\" 替换为 | Select-String \\\"text\\\",并将 /dev/null 替换为 NUL。\\n\\n如果 Google 认定某页面值得收录,可能会将其添加到一个庞大的网页数据库中,这个数据库称为索引。Google 可以在搜索结果中考虑其索引中的页面,当这些页面与用户的搜索内容相关时。Google 关于搜索工作原理的指南将这三个步骤称为抓取、索引和提供。\\n\\n抓取并不保证索引,索引也不保证出现在搜索结果中。同一篇指南指出,即使页面完全遵循 Google 的规则,Google 也无法保证这三个阶段中的任何一阶段。\\n\\n修复技术问题不一定能让您的网站在 Google 上排名第一。但修复问题确实能提高排名的可能性,因为每解决一个问题,网站本身就会变得更好。\\n\\n技术 SEO 必须与常规 SEO 结合,例如关键词、反向链接、社交媒体互动等。\\n\\n## 这些问题在真实网站中有多常见?\\n\\n以下数据来自我开发的网站审计工具运行的审计结果。每个网站仅计算一次,使用的是其首次审计的数据,数据日期为 10 月 25 日。\\n\\n爬虫会检查一个网站上的许多页面(此处中位数为 10 页)。单页审计通常检查首页,一次只检查一页。\\n\\n问题 | 出现频率 | 示例\\n--- | --- | ---\\n至少有一个页面没有规范标签 | 64.2% 的网站 | 53 个爬取的网站,2025 年 8 月至 2026 年 10 月\\n两个或更多页面标题完全相同 | 61.8% 的网站 | 34 个爬取的网站,其中两个或更多页面加载成功\\n至少有一个页面没有元描述 | 49.1% 的网站 | 53 个爬取的网站\\n至少有一个链接指向返回 404 的页面 | 18.9% 的网站 | \\n页面主要由 JavaScript 构建 | 17.7% 的页面 | 277 次单页审计,2026 年 5 月至 10 月\\n至少有一个页面没有标题 | 13.2% 的网站 | \\n搜索引擎可能无法追踪的链接 | 8.3% 的页面 | 278 次单页审计\\n包含错误的 robots.txt 文件或加载失败的文件 | 7.9% 的网站 | 252 次单页审计,2026 年 7 月至 10 月\\n页面被 noindex 或 robots.txt 阻止 | 4.8% 的页面 | 251 次单页审计,2026 年 7 月至 10 月\\n\\n这些都是技术问题,但它们的重要性并不相同。缺少规范标签的问题最为常见,但 Google 并不要求必须使用规范标签,因此缺少规范标签的页面本身并不算损坏。当相同或非常相似的内容可以通过多个 URL 访问时,这个问题才会变得重要,这将在规范标签部分进一步说明。\\n\\n重复标题是我自己也遇到过的问题:编写代码时,很容易忽略这类问题。这就是为什么有工具可以检查这些问题。\\n\\n让我们逐一查看表格中的每个问题,确保它们都清晰明了:\\n\\n- **缺少规范标签**:规范标签是您在 HTML 的 `\u003chead\u003e` 部分放置的众多标签之一。当两到三页的内容几乎完全相同时,它会告诉搜索引擎(如 Google)哪个 URL 是原始的、主要的版本,也就是您希望被收录的版本。虽然这不是强制要求,但如果没有规范标签,Google 会自行选择主要版本,因此这个问题主要影响存在重复页面的情况。\\n\\n- **重复标题**:在两个页面上出现相同的标题其实非常容易。您不希望出现重复标题,因为这不仅没有帮助,还可能让 Google 感到困惑。每一页都应该明确说明其内容。\\n\\n- 缺少元描述:这一点非常重要,因为它不仅有助于搜索引擎,还能帮助像 ChatGPT 这样的 AI 工具。元描述的作用是简明扼要地说明页面内容和用途。如果你在 Google 上搜索某个网站,会看到它显示在实际链接下方。\\n\\n- 指向 404 页面的链接:这意味着你存在一个失效链接(可能是你不再使用的链接),指向一个不存在的页面。因此,这个链接不应该指向不存在的内容,而是应引导到类似页面或真实存在的内容,以确保链接的相关性。\\n\\n- 主要由 JavaScript 构建的页面:虽然 Google 可以运行 JavaScript,但这本身不会阻止页面被 Google 收录。但内容只有在 JavaScript 加载执行后才会显示,这会降低访问速度,并增加出错的可能性。并非所有爬虫都能执行 JavaScript,因此我更倾向于对重要内容使用服务端渲染。\\n\\n- 搜索引擎无法追踪的链接:这不算大问题,具体影响取决于链接指向的位置。例如,如果我写了一篇很好的文章并希望它在 Google 上获得排名,但搜索引擎无法追踪到该链接,那么你投入大量时间和精力撰写的这篇文章可能只会被少数人看到。\\n\\n- robots.txt 文件中的错误:robots.txt 的作用是帮助你与搜索引擎沟通。如果该文件存在错误,可能会阻止搜索引擎爬取你希望出现在搜索结果中的页面。\\n\\n- 被 noindex 或 robots.txt 屏蔽的页面:这是两种不同的情况。noindex 规则要求搜索引擎不要将页面收录到结果中,而 robots.txt 规则仅阻止搜索引擎爬取页面。你将在本教程后续部分了解更多关于这两者的区别及其重要性。\\n\\n软性 404 错误、重定向链和错误的 canonical 标签未包含在表格中,因为审核工具不会记录这些问题。\\n\\n## 如何搭建练习网站\\n\\n练习网站是一个虚构鞋店 Acme Shoes 的小型网站。网站每一页都内置了一个问题。你不需要理解代码中的每一行。\\n\\n创建一个新文件夹,添加一个名为 server.js 的文件,并粘贴以下代码:\\n\\n```\\n// server.js: 一个包含常见技术 SEO 问题的小型练习网站\\nconst http = require('node:http');\\n\\nconst PORT = 8080;\\nconst BASE = 'http://localhost:' + PORT;\\n\\n// 构建一个简单的 HTML 页面。省略字段可省略对应标签\\nfunction page({ title, description, canonical, robots, body, script }) {\\n return [\\n '\u003c!doctype html\u003e',\\n '\u003chtml lang=\\\"en\\\"\u003e',\\n '\u003chead\u003e',\\n '\u003cmeta charset=\\\"utf-8\\\"\u003e',\\n title \u0026\u0026 '\u003ctitle\u003e' + title + '\u003c/title\u003e',\\n description \u0026\u0026 '\u003cmeta name=\\\"description\\\" content=\\\"' + description + '\\\"\u003e',\\n canonical \u0026\u0026 '\u003clink rel=\\\"canonical\\\" href=\\\"' + BASE + canonical + '\\\"\u003e',\\n robots \u0026\u0026 '\u003cmeta name=\\\"robots\\\" content=\\\"' + robots + '\\\"\u003e',\\n '\u003c/head\u003e',\\n '\u003cbody\u003e',\\n body,\\n script \u0026\u0026 '\u003cscript\u003e' + script + '\u003c/script\u003e',\\n '\u003c/body\u003e',\\n '\u003c/html\u003e',\\n ]\\n .filter(Boolean)\\n .join('\\\\n');\\n}\\n```\\n\\n```javascript\\nconst routes = {\\n '/': {\\n html: page({\\n title: 'Acme Shoes: 适合每位跑者的跑步鞋',\\n description: '适用于道路和山径的轻便跑步鞋,提供免费退换货服务。',\\n canonical: '/',\\n body: [\\n '\u003ch1\u003eAcme Shoes\u003c/h1\u003e',\\n '\u003ca href=\\\"/products/blue-runner\\\"\u003eBlue Runner\u003c/a\u003e',\\n '\u003cspan onclick=\\\"location.href=\\\\'/sale\\\\'\\\"\u003e夏季促销\u003c/span\u003e',\\n ].join('\\\\n'),\\n }),\\n },\\n // 问题:标题模糊且缺少元描述\\n '/products/blue-runner': {\\n html: page({\\n title: 'Acme Shoes',\\n canonical: '/products/blue-runner',\\n body: '\u003ch1\u003eBlue Runner\u003c/h1\u003e',\\n }),\\n },\\n // 问题:缺失的产品页面仍返回\\\"200 OK\\\"状态码(软404)\\n '/products/red-runner': {\\n html: page({\\n title: 'Acme Shoes',\\n body: '\u003ch1\u003e抱歉,未找到该产品。\u003c/h1\u003e',\\n }),\\n },\\n // 问题:存在重定向链,/old-sale -\u003e /sale-2025 -\u003e /sale\\n '/old-sale': { redirect: '/sale-2025' },\\n '/sale-2025': { redirect: '/sale' },\\n '/sale': {\\n html: page({\\n title: '夏季促销:跑步鞋最高优惠40% | Acme Shoes',\\n description: \\\"最高优惠40%购买上季跑步鞋,截止8月31日。\\\",\\n canonical: '/sale',\\n body: '\u003ch1\u003e夏季促销\u003c/h1\u003e',\\n }),\\n },\\n // 问题:页面本身无法看到的noindex头部\\n '/about': {\\n headers: { 'X-Robots-Tag': 'noindex' },\\n html: page({\\n title: '关于Acme Shoes',\\n description: '了解这个两人工作室如何发展成为跑步鞋品牌。',\\n canonical: '/about',\\n body: '\u003ch1\u003e关于我们\u003c/h1\u003e',\\n }),\\n },\\n // 问题:规范URL标签指向首页\\n '/blog/choosing-trail-shoes': {\\n html: page({\\n title: '如何选择山地跑步鞋 | Acme Shoes',\\n description: '抓地力、落差和贴合度:选择山地跑步鞋时需要关注的关键要素。',\\n canonical: '/',\\n body: '\u003ch1\u003e如何选择山地跑步鞋\u003c/h1\u003e',\\n }),\\n },\\n // 问题:内容需要JavaScript执行后才会加载\\n '/catalog': {\\n html: page({\\n title: '所有跑步鞋 | Acme Shoes',\\n description: '浏览所有Acme跑步鞋产品。',\\n canonical: '/catalog',\\n body: '\u003cdiv id=\\\"app\\\"\u003e加载中...\u003c/div\u003e',\\n script:\\n \\\"fetch('/api/products').then((r) =\u003e r.json()).then((products) =\u003e {\\\" +\\n \\\"document.getElementById('app').innerHTML = products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('');\\\" +\\n '});',\\n }),\\n },\\n '/api/products': {\\n type: 'application/json',\\n html: JSON.stringify(['Blue Runner', 'Trail Grip 2', 'City Glide']),\\n },\\n // 问题:robots.txt中的\\\"Disallow: /blog\\\"会阻止所有以/blog开头的路径\\n '/robots.txt': {\\n type: 'text/plain',\\n html: 'User-agent: *\\\\nDisallow: /blog\\\\n',\\n },\\n};\\n\\nhttp\\n .createServer((req, res) =\u003e {\\n const path = new URL(req.url, BASE).pathname;\\n const route = routes[path];\\n\\n if (!route) {\\n res.writeHead(404, { 'Content-Type': 'text/html; charset=utf-8' });\\n return res.end(page({ title: '页面未找到', body: '\u003ch1\u003e页面未找到\u003c/h1\u003e' }));\\n }\\n if (route.redirect) {\\n res.writeHead(301, { Location: route.redirect });\\n return res.end();\\n }\\n res.writeHead(200, {\\n 'Content-Type': (route.type || 'text/html') + '; charset=utf-8',\\n ...route.headers,\\n });\\n res.end(route.html);\\n })\\n .listen(PORT, () =\u003e console.log('练习站点运行在 ' + BASE));\\n```\\n\\n每个 `routes` 键对应一个页面地址。以 Problem: 开头的注释说明了每个页面存在的问题。\\n\\n从同一文件夹启动服务器:\\n\\n```\\nnode server.js\\n```\\n\\n你应该看到:\\n\\n```\\nPractice site running at http://localhost:8080\\n```\\n\\n保持服务器运行,然后打开第二个终端执行以下命令。当你修改 server.js 时,用 Ctrl+C 停止服务器并重新启动。\\n\\n## 如何检查页面的 HTTP 状态码\\n\\n我记得刚开始构建网站时,做过各种各样的小项目。作为全栈开发者,我一直在尝试各种实验。\\n\\n有一次服务器端出现故障,我在 Network 标签页看到返回了 500 错误。另一次我故意删除了某个页面,想看看是否会触发 404 或其他问题。如果你在构建网站时多做尝试,会从结果中学到很多。\\n\\nHTTP 状态码是搜索引擎读取的第一项信息。它们是服务器与客户端(如你的浏览器)通信的方式。状态码分为五个区间:1xx、2xx、3xx、4xx 和 5xx。例如 5xx 状态码表示服务器问题,4xx 状态码表示客户端问题。\\n\\n404 是最常见的错误。它表示站点上找不到该页面。你经常会看到 404 错误,通常只需维护好网站和链接即可解决。\\n\\n本教程中你会看到以下状态码:\\n\\n- 200 OK:页面已找到\\n- 301 Moved Permanently:页面已永久迁移至新地址\\n- 404 Not Found:此处无页面\\n\\n根据 Google 的 HTTP 状态码文档,Google 不会对返回 4xx 状态码的 URL 进行索引。\\n\\n要查看练习网站首页的状态码,使用 -I 参数(仅显示头部信息)和 -s 参数(隐藏 curl 进度条):\\n\\n```\\ncurl -sI http://localhost:8080/\\n```\\n\\n```\\nHTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n```\\n\\n现在请求一个不在路由表中的地址,看看正确的 404 错误是什么样子:\\n\\n```\\ncurl -sI http://localhost:8080/products/does-not-exist\\n```\\n\\n```\\nHTTP/1.1 404 Not Found\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n```\\n\\n在浏览器中打开开发者工具(F12 或 Mac 上的 Cmd+Option+I),进入 Network 标签页并刷新页面。状态列会显示状态码。\\n\\n### 什么是软 404?\\n\\n检查一个商店已停止销售的商品:\\n\\n```\\ncurl -sI http://localhost:8080/products/red-runner\\n```\\n\\n在浏览器中,同一页面会显示\\\"抱歉,未找到该商品\\\"。\\n\\n软 404 本质上是\\\"页面未找到\\\",但服务器仍返回 200 状态码。这会误导 Google,因为网址仍然存在,但内容已不再更新。\\n\\n要解决这个问题,应让缺失页面返回真正的 404 状态码,这正是 Google 推荐的做法。在练习网站中,从路由表中删除 '/products/red-runner' 条目。服务器随后会返回 404 状态码。\\n\\n破损链接会导致相同的结果。根据数据,被爬取的 53 个网站中有 18.9% 至少包含一个指向返回 404 的页面的链接。\\n\\n因此不要留下指向不存在内容的链接。应将其更新为指向相似内容或确实存在的页面。\\n\\n如果页面已迁移,应从旧地址添加 301 重定向到新地址。只有当页面确实不存在时,404 才是正确的响应。\\n\\n重定向基本上是指当你希望将一个 URL(可能是一个已不存在的 URL)发送到另一个 URL(存在的 URL)时的操作。例如,如果你将域名从 example-x.com 更改为 example-y.com,你可能会设置重定向,让所有输入 example-x.com 的用户自动跳转到 example-y.com。\\n\\n重定向本身是合理的,如果使用得当,它们可以非常有用。301 表示页面已永久移动,302 表示移动是临时的。Google 关于重定向的文档解释了它对每种状态的处理方式,其爬虫会跟踪最多 10 次重定向跳转。\\n\\n但当旧地址(例如过去使用过的域名)重定向到新地址后,新地址又继续重定向,形成链式结构时,问题就出现了。少量重定向影响不大,但五次、六次甚至七次重定向则可能造成显著问题。\\n\\n下面的第一个命令会显示链中的每一步,第二个命令会给出一行摘要。\\n\\n添加 -L 参数让 curl 跟随重定向:\\n\\n```\\ncurl -sIL http://localhost:8080/old-sale\\n```\\n\\n```\\nHTTP/1.1 301 Moved Permanently\\nLocation: /sale-2025\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n\\nHTTP/1.1 301 Moved Permanently\\nLocation: /sale\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n\\nHTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n```\\n\\n/old-sale 会跳转到 /sale-2025,再跳转到 /sale。要获取一行摘要:\\n\\n```\\ncurl -sL -o /dev/null -w \\\"%{num_redirects} redirects, ended at %{url_effective}\\\\n\\\" http://localhost:8080/old-sale\\n```\\n\\n```\\n2 redirects, ended at http://localhost:8080/sale\\n```\\n\\n-o /dev/null 告诉 curl 将页面的 HTML 内容丢弃,避免填充终端,只输出摘要信息。-w 参数用于设置摘要内容的格式。\\n\\n要修复这个问题,应直接将旧地址指向最终页面:\\n\\n```\\n'/old-sale': { redirect: '/sale' },\\n```\\n\\n重启服务器并再次运行摘要命令。现在显示为 1 次重定向,最终到达 http://localhost:8080/sale。\\n\\n## 如何确保 robots.txt 没有阻止重要页面\\n\\nrobots.txt 是网站告知搜索引擎(如 Google 及其爬虫)哪些内容可以访问、哪些不能访问的方式。\\n\\n查看实践站点的文件:\\n\\n```\\ncurl -s http://localhost:8080/robots.txt\\n```\\n\\n```\\nUser-agent: *\\nDisallow: /blog\\n```\\n\\nDisallow: /blog 是危险的,因为它阻止爬虫访问所有以 /blog 开头的路径。而通常,你的文章内容是推动网站流量的主要因素。\\n\\nGoogle 的 robots.txt 文档提供了类似的示例:Disallow: /fish 也会阻止 /fish.html 和 /fishheads。\\n\\n要修复这个问题,应仅阻止你本意要阻止的内容,例如草稿文件夹:\\n\\n```\\nUser-agent: *\\nDisallow: /blog-drafts/\\n```\\n\\n在实践站点中,修改 '/robots.txt' 条目的 html 行:\\n\\n```\\nhtml: 'User-agent: *\\\\nDisallow: /blog-drafts/\\\\n',\\n```\\n\\nrobots.txt 控制的是爬虫抓取行为,而非索引。Google 表示这不是阻止页面出现在 Google 中的机制。若要实现此目的,需要使用 noindex。\\n\\n即使某个 URL 被 robots.txt 阻止,它仍可能出现在搜索结果中(通常没有描述),如果其他页面链接到它。Google 只是永远不会读取该页面的内容。\\n\\n## 如何发现意外的 noindex\\n\\nnoindex 告诉 Google 不要索引特定页面。当它出现在您希望被索引和排名的页面(如产品页面或首页)时会产生负面影响。\\n\\n但在您不希望被排名的页面,或对网站贡献较小的页面(如登录、注册页面)上,它可以发挥积极作用。\\n\\n只有当爬虫能够访问页面并读取规则时,noindex 才会生效。如果 robots.txt 阻止了相同 URL,Google 将永远看不到 noindex,页面仍可能出现在搜索结果中。因此,若希望某页面不在 Google 中显示,请使用 noindex 并确保页面可被爬虫访问。\\n\\n在数据中,457 个审计页面中有 11 个(2.4%)包含 noindex robots 元标签。设置该标签有两种方式,需要检查两者。\\n\\n### 如何检查 Robots 元标签\\n\\n第一种方式是页面 \u003chead\u003e 中的标签:\\n\\n```\\n\u003cmeta name=\\\"robots\\\" content=\\\"noindex\\\"\u003e\\n```\\n\\n在页面中搜索该词:\\n\\n```\\ncurl -s http://localhost:8080/about | grep -i noindex\\n```\\n\\n在关于页面中,这会输出空内容。您也可以右键点击页面,选择“查看页面源代码”,然后搜索 noindex。\\n\\n修复 noindex 非常简单。您只需将其删除,搜索引擎即可索引页面。\\n\\n在页面代码或模板中查找该标签,并检查 CMS 或 SEO 插件设置。在 WordPress 中,“Discourage search engines from indexing this site” 设置会将该标签添加到每个页面。\\n\\n### 如何检查 X-Robots-Tag 请求头\\n\\n第二种方式是 HTTP 请求头。检查关于页面的请求头:\\n\\n```\\ncurl -sI http://localhost:8080/about\\n```\\n\\n```\\nHTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nX-Robots-Tag: noindex\\nDate: Sun, 25 Oct 2026 17:42:59 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n```\\n\\n该请求头不会出现在“查看页面源代码”中,只会出现在响应头中。在数据中,12 个被阻止页面中有 5 个 HTML 中没有 noindex:其中 2 个有此请求头,3 个被 robots.txt 阻止爬取。\\n\\n在实践站点中修复此问题,需从 '/about' 条目中删除请求头行。在真实站点中,需检查服务器配置、托管提供商的请求头设置以及任何 SEO 插件。\\n\\n## 如何正确使用规范标签\\n\\n如果您有多个页面讨论大致相同的内容,但内容不足以形成差异,您需要指定一个主页面。规范标签会告诉搜索引擎哪个页面是主页面。\\n\\n同一页面可能有多个地址:\\n\\n```\\nhttps://example.com/blog/choosing-trail-shoes\\nhttps://example.com/blog/choosing-trail-shoes?utm_source=newsletter\\nhttps://www.example.com/blog/choosing-trail-shoes\\n```\\n\\n这三个地址显示的是同一篇文章。第一个是主地址:您希望 Google 在搜索结果中显示的地址。因此,所有三个地址都包含相同的规范标签,指向该主页面:\\n\\n```\\n\u003clink rel=\\\"canonical\\\" href=\\\"https://example.com/blog/choosing-trail-shoes\\\"\u003e\\n```\\n\\n当 Google 在 ?utm_source=newsletter 版本上看到此标签时,它会知道该页面是第一个地址的副本。主地址携带相同的标签,指向自身。这称为自引用规范标签,表示:“我是主版本”。\\n\\nGoogle 将其视为一个强烈信号,而非强制命令。如果您使用规范标签,每个主页面使用自引用规范标签是一种良好实践,Google 也推荐这样做。\\n\\n但你根本不需要使用规范标签。Google 表示指定规范标签并不是强制要求:如果没有规范标签,Google 会自行选择它认为最适合展示给用户的版本。当同一内容或非常相似的内容可以通过多个 URL 访问时(例如上面的三个地址),规范标签是一个不错的选择。\\n\\n这就是为什么缺少规范标签本身并不构成缺陷。在数据中,457 个被审计页面中有 27.1% 没有规范标签。真正重要的是这些页面是否存在重复内容,例如带有跟踪参数的版本,这些内容可能需要规范标签。\\n\\n查看实践网站的徒步鞋文章:\\n\\n```\\ncurl -s http://localhost:8080/blog/choosing-trail-shoes | grep -i canonical\\n```\\n\\n```\\n\u003clink rel=\\\"canonical\\\" href=\\\"http://localhost:8080/\\\"\u003e\\n```\\n\\n该文章将主页设为主版本,因此 Google 可能选择展示主页而非该文章,或忽略该标签。\\n\\n该文章内容是原创的,因此它本身应作为主版本。要修复这个问题,请将文章的规范标签指向文章本身:\\n\\n```\\ncanonical: '/blog/choosing-trail-shoes',\\n```\\n\\n## 如何修复缺失或重复的标题和元描述\\n\\n优秀的标题或元描述应长度适中、不过载,并能简洁地说明页面内容。它某种程度上是页面的核心,就像页面的简介。\\n\\n查看 Blue Runner 产品页面:\\n\\n```\\ncurl -s http://localhost:8080/products/blue-runner | grep -i -E \\\"\u003ctitle\u003e|name=\\\\\\\"description\\\\\\\"\\\"\\n```\\n\\n```\\n\u003ctitle\u003eAcme Shoes\u003c/title\u003e\\n```\\n\\n该标题对页面内容没有任何说明,且完全没有描述信息。在 PowerShell 中,可以使用 | Select-String '\u003ctitle\u003e|name=\\\"description\\\"' 来查找此类问题。\\n\\nGoogle 关于标题和摘要的指南要求每一页都应有独特且具有描述性的标题和描述。\\n\\n在实践网站中修复此问题,将 '/products/blue-runner' 条目中的标题行替换为:\\n\\n```\\ntitle: 'Blue Runner Road Running Shoe | Acme Shoes',\\ndescription: 'A lightweight road running shoe with a cushioned sole and free returns.',\\n```\\n\\n## 如何使链接可爬取\\n\\n查看实践网站的主页:\\n\\n```\\ncurl -s http://localhost:8080/\\n```\\n\\n```\\n\u003c!doctype html\u003e\\n\u003chtml lang=\\\"en\\\"\u003e\\n\u003chead\u003e\\n\u003cmeta charset=\\\"utf-8\\\"\u003e\\n\u003ctitle\u003eAcme Shoes: Running Shoes for Every Runner\u003c/title\u003e\\n\u003cmeta name=\\\"description\\\" content=\\\"Lightweight running shoes for road and trail, with free returns.\\\"\u003e\\n\u003clink rel=\\\"canonical\\\" href=\\\"http://localhost:8080/\\\"\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n\u003ch1\u003eAcme Shoes\u003c/h1\u003e\\n\u003ca href=\\\"/products/blue-runner\\\"\u003eBlue Runner\u003c/a\u003e\\n\u003cspan onclick=\\\"location.href='/sale'\\\"\u003eSummer sale\u003c/span\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\\n```\\n\\n该页面的其他内容都很好:标题、描述、规范标签以及 Blue Runner 链接(这是一个带有 href 的真实 \u003ca\u003e 元素)。唯一的问题是 \\\"Summer sale\\\" 这个 \u003cspan\u003e 元素。\\n\\n\u003cspan\u003e 基本上是非语义化的 HTML 元素,意味着它没有实际意义。真正的链接确实有含义:搜索引擎可以理解这是一个链接,屏幕阅读器也能识别这是一个链接。\\n\\n哪些链接需要可爬取?基本上是你希望搜索引擎看到的一切。我的意思是你要销售的产品、你的文章、你的课程以及其他类似的内容。\\n\\nGoogle 的链接指南指出,它只能可靠地爬取带有 href 属性的 \u003ca\u003e 元素。\\n\\n在实践网站中修复此问题,将 \u003cspan\u003e 行替换为:\\n\\n```\\n'\u003ca href=\\\"/sale\\\"\u003eSummer sale\u003c/a\u003e',\\n```\\n\\n## 如何检查内容是否需要 JavaScript 才能显示\\n\\n在客户端渲染中,JavaScript 必须首先加载,之后其他内容才能加载。\\n\\nJavaScript 通常用于构建产品列表、价格、评论和菜单等内容。没有它时,客户端页面通常只会显示加载信息或空白框。\\n\\n谷歌确实会渲染 JavaScript,但会在稍后的阶段进行。页面会进入渲染队列,可能需要几秒甚至更长时间,而脚本如果失败或被阻塞,可能导致渲染后的页面缺少内容。\\n\\n这就是为什么服务器端渲染仍然是一个好主意,也是我更倾向于用于重要内容的方式。谷歌的 JavaScript 指南也持相同观点:服务器端渲染能为用户和爬虫提供更快的网站体验,并非所有爬虫都能运行 JavaScript。\\n\\n数据显示,在 277 个被审核的页面中,17.7% 的页面主要由 JavaScript 构建。这并不意味着谷歌无法抓取这些页面,只是说明它们的主要内容依赖于 JavaScript 正确运行。\\n\\n通过服务器端渲染,HTML 内容会直接发送到浏览器,之后才会执行 JavaScript 渲染。\\n\\n谷歌可以抓取通过这两种方式构建的页面。其爬虫使用最新版 Chrome 运行 JavaScript,因此服务器端渲染并不是进入谷歌索引的必要条件。\\n\\n下一个测试检查重要内容是否在没有 JavaScript 的情况下可见。它不会显示谷歌看到的内容(因为谷歌会运行 JavaScript),但会显示所有爬虫在 JavaScript 执行前看到的内容。\\n\\n在浏览器中打开 http://localhost:8080/catalog。你会看到三个产品。现在使用不运行 JavaScript 的 curl 下载页面:\\n\\n```\\ncurl -s http://localhost:8080/catalog | grep -i \\\"trail grip\\\"\\n```\\n\\n这不会输出任何内容,因为产品名称不在服务器发送的 HTML 中。在 `\u003cbody\u003e` 中,服务器只发送:\\n\\n```\\n\u003cdiv id=\\\"app\\\"\u003eLoading...\u003c/div\u003e\\n\u003cscript\u003efetch('/api/products').then((r) =\u003e r.json()).then((products) =\u003e {document.getElementById('app').innerHTML = products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('');});\u003c/script\u003e\\n```\\n\\n如果不使用 curl,可以在浏览器中使用“查看页面源代码”功能。在这个页面上,你会看到 \\\"Loading...\\\" 和脚本,但看不到产品名称,因为浏览器只有在 JavaScript 执行后才会添加它们。\\n\\n在你自己的网站上,搜索页面源代码中的一句重要内容。\\n\\n要查看谷歌渲染页面的方式,可以使用谷歌自己的工具对实时页面进行测试。在你自己的网站上,搜索控制台中的 URL 检查工具(Test live URL,然后 View tested page)可以运行实时测试,并显示谷歌渲染的 HTML 和截图。\\n\\n对于任何公开页面,丰富结果测试(Rich Results Test)也会显示渲染后的 HTML。谷歌推荐两者都用于查找 JavaScript 问题。两者都无法访问 localhost,因此请在你的真实网站上尝试。\\n\\n如果你想从一开始就在 HTML 中显示产品名称,请在服务器端渲染它们。在示例网站中,将产品列表添加到路由上方:\\n\\n```\\nconst products = ['Blue Runner', 'Trail Grip 2', 'City Glide'];\\n```\\n\\n将 catalog 的 body 和 script 行替换为:\\n\\n```\\nbody: '\u003cdiv id=\\\"app\\\"\u003e' + products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('') + '\u003c/div\u003e',\\n```\\n\\n并在 '/api/products' 入口处:\\n\\n```\\nhtml: JSON.stringify(products),\\n```\\n\\n重启服务器并再次运行 curl 命令:\\n\\n```\\n\u003cdiv id=\\\"app\\\"\u003e\u003ch2\u003eBlue Runner\u003c/h2\u003e\u003ch2\u003eTrail Grip 2\u003c/h2\u003e\u003ch2\u003eCity Glide\u003c/h2\u003e\u003c/div\u003e\\n```\\n\\n这之所以有效,是因为服务器现在在发送页面前就将产品名称写入 HTML。任何爬虫都能看到这些内容,即使它们无法运行 JavaScript,你仍然可以使用 JavaScript 实现交互功能。\\n\\n## 五分钟内能检查页面吗?\\n\\n说实话,这非常困难。可能会出现很多问题,五分钟的时间远远不够。\\n\\n要真正了解具体存在哪些问题,你需要运行完整的检查,例如在Google PageSpeed Insights中进行检查。如果网站属于你本人,还可以使用Google Search Console中的URL检查工具。\\n\\n本教程中的命令是一个不错的起点:\\n\\n- 使用curl -sI检查状态码和X-Robots-Tag头信息。\\n\\n- 使用curl -sIL检查旧地址以统计重定向次数。\\n\\n- 逐行查看/robots.txt文件。\\n\\n- 在页面源代码中检查noindex标签、canonical标签、\u003ctitle\u003e标签、描述信息和重要内容。\\n\\n## 结论\\n\\n在本教程中,你修复了实践网站上的八个问题:软404错误、重定向链、robots.txt规则、隐藏的noindex头信息、错误的canonical标签、模糊的标题和缺失的描述、爬虫无法追踪的链接,以及需要JavaScript才能访问的内容。\\n\\n最重要的是,你需要持续检查网站。定期运行扫描,进行维护,确保网站功能正常,尤其是在对网站进行优化或更改时。\\n\\n如果你想更进一步,我关于在Next.js网站中添加结构化数据(JSON-LD)的教程是一个不错的下一步选择。\\n\\n如果你想一次性检查实时页面的多个问题,我的免费工具Greadme Page Audit可以无需注册直接测试任何URL。\\n\\n推荐课程(合作伙伴推荐,1/5)\\n\\n(在新标签页中打开)\\n\\n广告\\n\\n- Coursera 2026 Google Search Console:#1 SEO工具用于跟踪SEO Alex Genadinik 2小时 初学者 证书 查看课程(在新标签页中打开)\\n\\n- Udemy SEO 2027:如何在Google上排名第一 - 最终SEO课程 iMarket XL和Matt Jensen 4.3(1,883) 4小时48分钟 初学者 证书 查看课程(在新标签页中打开)\\n\\n- Udemy SEO:亚马逊联盟营销+SEO |250+视频 |18.0小时 The SEO Academy SEO教育领导者 4.5(3,420) 20小时6分钟 初学者 证书 查看课程(在新标签页中打开)\\n\\n- Skillshare SEO 2024:SEO入门 Arkadiusz Włodarczyk 4.3(10) 2小时54分钟 初学者 查看课程(在新标签页中打开)\\n\\n更多SEO课程请查看Class Central\\n\\n→\\n\\n推荐课程(合作伙伴推荐,2/5)\\n\\n- Udemy 从零开始学习高级SEO,完整SEO培训课程 Debajyoti Banerjee 4.2(1,772) 10小时51分钟 初学者 查看课程(在新标签页中打开)\\n\\n- Skillshare SEO审计 - 学习如何发现和修复网站上最常见的SEO问题 Joshua George 4.6(54) 1小时58分钟 初学者 查看课程(在新标签页中打开)\\n\\n- Skillshare SEO Google:SEO基础:WordPress SEO入门 Jim Bruce 4.4(26) 1小时26分钟 初学者 查看课程(在新标签页中打开)\\n\\n- Udemy SEO入门教程 Daragh Walsh 4.5(33,729) 45分钟 初学者 查看课程(在新标签页中打开)\\n\\n推荐课程(合作伙伴推荐,3/5)\\n\\n- Coursera 使用HTML \u0026 CSS创建多页应用 Omnya Khaled 4.2(14) 1小时55分钟 初学者 证书 查看课程(在新标签页中打开)\\n\\n- Coursera 搜索引擎优化课程 LearnKartS和Tanmoy Kumar Das 6周,每周3小时 初学者 证书 查看课程(在新标签页中打开)\\n\\n合作伙伴推荐课程(侧边栏,第4部分共5部分)\\n\\n合作伙伴推荐课程(侧边栏,第5部分共5部分)\\n\\n我是一名软件开发人员和SEO专家,热爱构建真正满足人们需求的产品。我喜欢将想法转化为实际产品,探索新技术并在过程中不断学习。我也热衷于与其他开发者分享所学知识。\\n\\n如果你读到这里,请向作者表达感谢以示支持。说声谢谢\\n\\n免费学习编程。freeCodeCamp的开源课程已帮助超过40,000人成为开发者。立即开始\\n\\n合作伙伴推荐课程\",\"speakable\":{\"@type\":\"SpeakableSpecification\",\"cssSelector\":[\"[data-speakable='summary']\",\"[data-speakable='takeaways']\"]},\"author\":{\"@type\":\"Organization\",\"name\":\"freeCodeCamp.org\",\"url\":\"https://www.freecodecamp.org\"},\"publisher\":{\"@type\":\"Organization\",\"name\":\"traeai\",\"url\":\"https://www.traeai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://www.traeai.com/icon.svg\"},\"sameAs\":[\"https://github.com/cq0206/traeai\"]},\"mainEntityOfPage\":\"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b\"},{\"@type\":\"WebSite\",\"@id\":\"https://www.traeai.com/#website\",\"url\":\"https://www.traeai.com\",\"name\":\"traeai\",\"description\":\"traeai 为开发者、研究员和内容团队筛选高质量 AI 技术内容,提供摘要、评分、趋势雷达与知识库产出。\",\"inLanguage\":[\"zh-CN\",\"en\"],\"potentialAction\":{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https://www.traeai.com/?q={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"首页\",\"item\":\"https://www.traeai.com/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"文章\",\"item\":\"https://www.traeai.com/brief\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"freeCodeCamp.org\",\"item\":\"https://www.traeai.com/sources\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How to Find and Fix Common Technical SEO Issues on Your Website\",\"item\":\"https://www.traeai.com/articles/75786002-fd1d-4153-8a9c-95e923c4269b\"}]}]}"])</script><script>self.__next_f.push([1,"6:[\"$\",\"div\",null,{\"className\":\"min-h-screen bg-slate-50 text-slate-950\",\"children\":[[\"$\",\"header\",null,{\"className\":\"sticky top-0 z-40 border-b border-slate-100 bg-white/90 backdrop-blur\",\"children\":[\"$\",\"nav\",null,{\"aria-label\":\"阅读导航\",\"className\":\"mx-auto flex h-14 max-w-[1280px] items-center justify-between gap-3 px-4 lg:px-6\",\"children\":[[\"$\",\"a\",null,{\"className\":\"rounded-md border border-slate-200 px-3 py-1.5 text-sm font-medium text-slate-600 hover:text-slate-950\",\"href\":\"/\",\"children\":\"返回首页\"}],[\"$\",\"a\",null,{\"className\":\"rounded-md border border-slate-200 px-3 py-1.5 text-sm font-medium text-slate-600 hover:text-slate-950\",\"href\":\"/sources\",\"children\":\"内容来源\"}]]}]}],[\"$\",\"main\",null,{\"className\":\"mx-auto max-w-[1280px] px-4 py-6 lg:px-6\",\"children\":[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$1a\"},\"type\":\"application/ld+json\"}],null,\"$L1b\",\"$L1c\"]}]]}]\n"])</script><script>self.__next_f.push([1,"1d:I[61906,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"ArticleViewTracker\"]\n1b:[\"$\",\"$L1d\",null,{\"articleId\":\"75786002-fd1d-4153-8a9c-95e923c4269b\",\"referrer\":\"direct\"}]\n"])</script><script>self.__next_f.push([1,"1e:I[6185,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"SaveToWorkspaceButton\"]\n1f:I[99377,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"SaveAsNoteButton\"]\n20:I[41535,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"TldrBlock\"]\n21:T8246,"])</script><script>self.__next_f.push([1,"# 如何发现并修复网站上的常见技术SEO问题\n\n2026年11月3日\n\n/\n\n#SEO\n\nSaar Twito\n\n假设你已经搭建了一个网站。你投入了设计,购买了域名,等等。但网站不仅仅是屏幕上看到的内容。幕后还有很多事情在发生。你需要了解互联网的工作原理,以及搜索引擎优化(SEO)的运作方式。\n\n速度也是其中的关键部分。一个加载缓慢的网站可能会有非常弱的SEO效果,因为大多数人不会花太多时间等待页面加载,尤其是在现在这个时代。\n\n网站速度是一个广为人知的话题,本身有许多需要考虑的问题,例如最大内容绘制(LCP)、累积布局偏移(CLS)和服务器速度。但我会在另一篇文章中详细讨论这些内容。\n\n本文重点介绍阻止搜索引擎访问和读取你页面的问题。\n\n在我看来,技术SEO比常规SEO(侧重于内容和关键词)更难实施。技术方面通常需要开发者的知识,如果没有技术背景,可能需要进行一些令人不太舒服的更改。\n\n技术问题可能在数月内都未被发现,因为通常你看不到它。这不是设计问题。你只有在运行特定检查时才能发现它,例如使用Google PageSpeed Insights。\n\n在本教程中,你将发现并修复小型练习网站上最常见的问题。我不想使用真实网站并让其所有者感到尴尬,因此我搭建了一个已经包含这些问题的练习网站。\n\n## 目录\n\n- 先决条件\n\n- 什么是技术SEO?\n\n- 这些问题在真实网站上有多常见?\n\n- 如何设置练习网站\n\n- 如何检查页面的HTTP状态码 什么是软404?\n\n- 如何发现并修复重定向链\n\n- 如何确保robots.txt没有阻止重要页面\n\n- 如何发现意外的noindex 如何检查robots元标签 如何检查X-Robots-Tag头\n\n- 如何正确使用规范标签\n\n- 如何修复缺失和重复的标题和元描述\n\n- 如何使链接可爬取\n\n- 如何检查内容是否需要JavaScript才能显示\n\n- 五分钟内能否检查页面?\n\n- 结论\n\n## 先决条件\n\n你不需要是经验丰富的程序员也能跟上教程。你需要:\n\n- 一个网络浏览器,如Chrome、Firefox、Edge或Safari。在Safari中,首先在“设置”\u003e“高级”中启用“显示Web开发者功能”。\n\n- 一个终端:macOS上的终端,Windows上的PowerShell,或Linux上的任何终端。\n\n- curl,一个下载网页的小程序。它包含在macOS、大多数Linux发行版以及Windows 10(1803版本及更高版本)和Windows 11中。\n\n- Node.js,用于运行练习网站。代码在Node.js 26.8和curl 8.7上进行了测试。\n\n在Windows PowerShell中,使用curl.exe而不是curl,因为在Windows中curl是另一个命令的快捷方式。将 | grep -i \"text\" 替换为 | Select-String \"text\",并将 /dev/null 替换为 NUL。\n\n如果 Google 认定某页面值得收录,可能会将其添加到一个庞大的网页数据库中,这个数据库称为索引。Google 可以在搜索结果中考虑其索引中的页面,当这些页面与用户的搜索内容相关时。Google 关于搜索工作原理的指南将这三个步骤称为抓取、索引和提供。\n\n抓取并不保证索引,索引也不保证出现在搜索结果中。同一篇指南指出,即使页面完全遵循 Google 的规则,Google 也无法保证这三个阶段中的任何一阶段。\n\n修复技术问题不一定能让您的网站在 Google 上排名第一。但修复问题确实能提高排名的可能性,因为每解决一个问题,网站本身就会变得更好。\n\n技术 SEO 必须与常规 SEO 结合,例如关键词、反向链接、社交媒体互动等。\n\n## 这些问题在真实网站中有多常见?\n\n以下数据来自我开发的网站审计工具运行的审计结果。每个网站仅计算一次,使用的是其首次审计的数据,数据日期为 10 月 25 日。\n\n爬虫会检查一个网站上的许多页面(此处中位数为 10 页)。单页审计通常检查首页,一次只检查一页。\n\n问题 | 出现频率 | 示例\n--- | --- | ---\n至少有一个页面没有规范标签 | 64.2% 的网站 | 53 个爬取的网站,2025 年 8 月至 2026 年 10 月\n两个或更多页面标题完全相同 | 61.8% 的网站 | 34 个爬取的网站,其中两个或更多页面加载成功\n至少有一个页面没有元描述 | 49.1% 的网站 | 53 个爬取的网站\n至少有一个链接指向返回 404 的页面 | 18.9% 的网站 | \n页面主要由 JavaScript 构建 | 17.7% 的页面 | 277 次单页审计,2026 年 5 月至 10 月\n至少有一个页面没有标题 | 13.2% 的网站 | \n搜索引擎可能无法追踪的链接 | 8.3% 的页面 | 278 次单页审计\n包含错误的 robots.txt 文件或加载失败的文件 | 7.9% 的网站 | 252 次单页审计,2026 年 7 月至 10 月\n页面被 noindex 或 robots.txt 阻止 | 4.8% 的页面 | 251 次单页审计,2026 年 7 月至 10 月\n\n这些都是技术问题,但它们的重要性并不相同。缺少规范标签的问题最为常见,但 Google 并不要求必须使用规范标签,因此缺少规范标签的页面本身并不算损坏。当相同或非常相似的内容可以通过多个 URL 访问时,这个问题才会变得重要,这将在规范标签部分进一步说明。\n\n重复标题是我自己也遇到过的问题:编写代码时,很容易忽略这类问题。这就是为什么有工具可以检查这些问题。\n\n让我们逐一查看表格中的每个问题,确保它们都清晰明了:\n\n- **缺少规范标签**:规范标签是您在 HTML 的 `\u003chead\u003e` 部分放置的众多标签之一。当两到三页的内容几乎完全相同时,它会告诉搜索引擎(如 Google)哪个 URL 是原始的、主要的版本,也就是您希望被收录的版本。虽然这不是强制要求,但如果没有规范标签,Google 会自行选择主要版本,因此这个问题主要影响存在重复页面的情况。\n\n- **重复标题**:在两个页面上出现相同的标题其实非常容易。您不希望出现重复标题,因为这不仅没有帮助,还可能让 Google 感到困惑。每一页都应该明确说明其内容。\n\n- 缺少元描述:这一点非常重要,因为它不仅有助于搜索引擎,还能帮助像 ChatGPT 这样的 AI 工具。元描述的作用是简明扼要地说明页面内容和用途。如果你在 Google 上搜索某个网站,会看到它显示在实际链接下方。\n\n- 指向 404 页面的链接:这意味着你存在一个失效链接(可能是你不再使用的链接),指向一个不存在的页面。因此,这个链接不应该指向不存在的内容,而是应引导到类似页面或真实存在的内容,以确保链接的相关性。\n\n- 主要由 JavaScript 构建的页面:虽然 Google 可以运行 JavaScript,但这本身不会阻止页面被 Google 收录。但内容只有在 JavaScript 加载执行后才会显示,这会降低访问速度,并增加出错的可能性。并非所有爬虫都能执行 JavaScript,因此我更倾向于对重要内容使用服务端渲染。\n\n- 搜索引擎无法追踪的链接:这不算大问题,具体影响取决于链接指向的位置。例如,如果我写了一篇很好的文章并希望它在 Google 上获得排名,但搜索引擎无法追踪到该链接,那么你投入大量时间和精力撰写的这篇文章可能只会被少数人看到。\n\n- robots.txt 文件中的错误:robots.txt 的作用是帮助你与搜索引擎沟通。如果该文件存在错误,可能会阻止搜索引擎爬取你希望出现在搜索结果中的页面。\n\n- 被 noindex 或 robots.txt 屏蔽的页面:这是两种不同的情况。noindex 规则要求搜索引擎不要将页面收录到结果中,而 robots.txt 规则仅阻止搜索引擎爬取页面。你将在本教程后续部分了解更多关于这两者的区别及其重要性。\n\n软性 404 错误、重定向链和错误的 canonical 标签未包含在表格中,因为审核工具不会记录这些问题。\n\n## 如何搭建练习网站\n\n练习网站是一个虚构鞋店 Acme Shoes 的小型网站。网站每一页都内置了一个问题。你不需要理解代码中的每一行。\n\n创建一个新文件夹,添加一个名为 server.js 的文件,并粘贴以下代码:\n\n```\n// server.js: 一个包含常见技术 SEO 问题的小型练习网站\nconst http = require('node:http');\n\nconst PORT = 8080;\nconst BASE = 'http://localhost:' + PORT;\n\n// 构建一个简单的 HTML 页面。省略字段可省略对应标签\nfunction page({ title, description, canonical, robots, body, script }) {\n return [\n '\u003c!doctype html\u003e',\n '\u003chtml lang=\"en\"\u003e',\n '\u003chead\u003e',\n '\u003cmeta charset=\"utf-8\"\u003e',\n title \u0026\u0026 '\u003ctitle\u003e' + title + '\u003c/title\u003e',\n description \u0026\u0026 '\u003cmeta name=\"description\" content=\"' + description + '\"\u003e',\n canonical \u0026\u0026 '\u003clink rel=\"canonical\" href=\"' + BASE + canonical + '\"\u003e',\n robots \u0026\u0026 '\u003cmeta name=\"robots\" content=\"' + robots + '\"\u003e',\n '\u003c/head\u003e',\n '\u003cbody\u003e',\n body,\n script \u0026\u0026 '\u003cscript\u003e' + script + '\u003c/script\u003e',\n '\u003c/body\u003e',\n '\u003c/html\u003e',\n ]\n .filter(Boolean)\n .join('\\n');\n}\n```\n\n```javascript\nconst routes = {\n '/': {\n html: page({\n title: 'Acme Shoes: 适合每位跑者的跑步鞋',\n description: '适用于道路和山径的轻便跑步鞋,提供免费退换货服务。',\n canonical: '/',\n body: [\n '\u003ch1\u003eAcme Shoes\u003c/h1\u003e',\n '\u003ca href=\"/products/blue-runner\"\u003eBlue Runner\u003c/a\u003e',\n '\u003cspan onclick=\"location.href=\\'/sale\\'\"\u003e夏季促销\u003c/span\u003e',\n ].join('\\n'),\n }),\n },\n // 问题:标题模糊且缺少元描述\n '/products/blue-runner': {\n html: page({\n title: 'Acme Shoes',\n canonical: '/products/blue-runner',\n body: '\u003ch1\u003eBlue Runner\u003c/h1\u003e',\n }),\n },\n // 问题:缺失的产品页面仍返回\"200 OK\"状态码(软404)\n '/products/red-runner': {\n html: page({\n title: 'Acme Shoes',\n body: '\u003ch1\u003e抱歉,未找到该产品。\u003c/h1\u003e',\n }),\n },\n // 问题:存在重定向链,/old-sale -\u003e /sale-2025 -\u003e /sale\n '/old-sale': { redirect: '/sale-2025' },\n '/sale-2025': { redirect: '/sale' },\n '/sale': {\n html: page({\n title: '夏季促销:跑步鞋最高优惠40% | Acme Shoes',\n description: \"最高优惠40%购买上季跑步鞋,截止8月31日。\",\n canonical: '/sale',\n body: '\u003ch1\u003e夏季促销\u003c/h1\u003e',\n }),\n },\n // 问题:页面本身无法看到的noindex头部\n '/about': {\n headers: { 'X-Robots-Tag': 'noindex' },\n html: page({\n title: '关于Acme Shoes',\n description: '了解这个两人工作室如何发展成为跑步鞋品牌。',\n canonical: '/about',\n body: '\u003ch1\u003e关于我们\u003c/h1\u003e',\n }),\n },\n // 问题:规范URL标签指向首页\n '/blog/choosing-trail-shoes': {\n html: page({\n title: '如何选择山地跑步鞋 | Acme Shoes',\n description: '抓地力、落差和贴合度:选择山地跑步鞋时需要关注的关键要素。',\n canonical: '/',\n body: '\u003ch1\u003e如何选择山地跑步鞋\u003c/h1\u003e',\n }),\n },\n // 问题:内容需要JavaScript执行后才会加载\n '/catalog': {\n html: page({\n title: '所有跑步鞋 | Acme Shoes',\n description: '浏览所有Acme跑步鞋产品。',\n canonical: '/catalog',\n body: '\u003cdiv id=\"app\"\u003e加载中...\u003c/div\u003e',\n script:\n \"fetch('/api/products').then((r) =\u003e r.json()).then((products) =\u003e {\" +\n \"document.getElementById('app').innerHTML = products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('');\" +\n '});',\n }),\n },\n '/api/products': {\n type: 'application/json',\n html: JSON.stringify(['Blue Runner', 'Trail Grip 2', 'City Glide']),\n },\n // 问题:robots.txt中的\"Disallow: /blog\"会阻止所有以/blog开头的路径\n '/robots.txt': {\n type: 'text/plain',\n html: 'User-agent: *\\nDisallow: /blog\\n',\n },\n};\n\nhttp\n .createServer((req, res) =\u003e {\n const path = new URL(req.url, BASE).pathname;\n const route = routes[path];\n\n if (!route) {\n res.writeHead(404, { 'Content-Type': 'text/html; charset=utf-8' });\n return res.end(page({ title: '页面未找到', body: '\u003ch1\u003e页面未找到\u003c/h1\u003e' }));\n }\n if (route.redirect) {\n res.writeHead(301, { Location: route.redirect });\n return res.end();\n }\n res.writeHead(200, {\n 'Content-Type': (route.type || 'text/html') + '; charset=utf-8',\n ...route.headers,\n });\n res.end(route.html);\n })\n .listen(PORT, () =\u003e console.log('练习站点运行在 ' + BASE));\n```\n\n每个 `routes` 键对应一个页面地址。以 Problem: 开头的注释说明了每个页面存在的问题。\n\n从同一文件夹启动服务器:\n\n```\nnode server.js\n```\n\n你应该看到:\n\n```\nPractice site running at http://localhost:8080\n```\n\n保持服务器运行,然后打开第二个终端执行以下命令。当你修改 server.js 时,用 Ctrl+C 停止服务器并重新启动。\n\n## 如何检查页面的 HTTP 状态码\n\n我记得刚开始构建网站时,做过各种各样的小项目。作为全栈开发者,我一直在尝试各种实验。\n\n有一次服务器端出现故障,我在 Network 标签页看到返回了 500 错误。另一次我故意删除了某个页面,想看看是否会触发 404 或其他问题。如果你在构建网站时多做尝试,会从结果中学到很多。\n\nHTTP 状态码是搜索引擎读取的第一项信息。它们是服务器与客户端(如你的浏览器)通信的方式。状态码分为五个区间:1xx、2xx、3xx、4xx 和 5xx。例如 5xx 状态码表示服务器问题,4xx 状态码表示客户端问题。\n\n404 是最常见的错误。它表示站点上找不到该页面。你经常会看到 404 错误,通常只需维护好网站和链接即可解决。\n\n本教程中你会看到以下状态码:\n\n- 200 OK:页面已找到\n- 301 Moved Permanently:页面已永久迁移至新地址\n- 404 Not Found:此处无页面\n\n根据 Google 的 HTTP 状态码文档,Google 不会对返回 4xx 状态码的 URL 进行索引。\n\n要查看练习网站首页的状态码,使用 -I 参数(仅显示头部信息)和 -s 参数(隐藏 curl 进度条):\n\n```\ncurl -sI http://localhost:8080/\n```\n\n```\nHTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n现在请求一个不在路由表中的地址,看看正确的 404 错误是什么样子:\n\n```\ncurl -sI http://localhost:8080/products/does-not-exist\n```\n\n```\nHTTP/1.1 404 Not Found\nContent-Type: text/html; charset=utf-8\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n在浏览器中打开开发者工具(F12 或 Mac 上的 Cmd+Option+I),进入 Network 标签页并刷新页面。状态列会显示状态码。\n\n### 什么是软 404?\n\n检查一个商店已停止销售的商品:\n\n```\ncurl -sI http://localhost:8080/products/red-runner\n```\n\n在浏览器中,同一页面会显示\"抱歉,未找到该商品\"。\n\n软 404 本质上是\"页面未找到\",但服务器仍返回 200 状态码。这会误导 Google,因为网址仍然存在,但内容已不再更新。\n\n要解决这个问题,应让缺失页面返回真正的 404 状态码,这正是 Google 推荐的做法。在练习网站中,从路由表中删除 '/products/red-runner' 条目。服务器随后会返回 404 状态码。\n\n破损链接会导致相同的结果。根据数据,被爬取的 53 个网站中有 18.9% 至少包含一个指向返回 404 的页面的链接。\n\n因此不要留下指向不存在内容的链接。应将其更新为指向相似内容或确实存在的页面。\n\n如果页面已迁移,应从旧地址添加 301 重定向到新地址。只有当页面确实不存在时,404 才是正确的响应。\n\n重定向基本上是指当你希望将一个 URL(可能是一个已不存在的 URL)发送到另一个 URL(存在的 URL)时的操作。例如,如果你将域名从 example-x.com 更改为 example-y.com,你可能会设置重定向,让所有输入 example-x.com 的用户自动跳转到 example-y.com。\n\n重定向本身是合理的,如果使用得当,它们可以非常有用。301 表示页面已永久移动,302 表示移动是临时的。Google 关于重定向的文档解释了它对每种状态的处理方式,其爬虫会跟踪最多 10 次重定向跳转。\n\n但当旧地址(例如过去使用过的域名)重定向到新地址后,新地址又继续重定向,形成链式结构时,问题就出现了。少量重定向影响不大,但五次、六次甚至七次重定向则可能造成显著问题。\n\n下面的第一个命令会显示链中的每一步,第二个命令会给出一行摘要。\n\n添加 -L 参数让 curl 跟随重定向:\n\n```\ncurl -sIL http://localhost:8080/old-sale\n```\n\n```\nHTTP/1.1 301 Moved Permanently\nLocation: /sale-2025\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n\nHTTP/1.1 301 Moved Permanently\nLocation: /sale\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n\nHTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nDate: Sun, 25 Oct 2026 17:42:53 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n/old-sale 会跳转到 /sale-2025,再跳转到 /sale。要获取一行摘要:\n\n```\ncurl -sL -o /dev/null -w \"%{num_redirects} redirects, ended at %{url_effective}\\n\" http://localhost:8080/old-sale\n```\n\n```\n2 redirects, ended at http://localhost:8080/sale\n```\n\n-o /dev/null 告诉 curl 将页面的 HTML 内容丢弃,避免填充终端,只输出摘要信息。-w 参数用于设置摘要内容的格式。\n\n要修复这个问题,应直接将旧地址指向最终页面:\n\n```\n'/old-sale': { redirect: '/sale' },\n```\n\n重启服务器并再次运行摘要命令。现在显示为 1 次重定向,最终到达 http://localhost:8080/sale。\n\n## 如何确保 robots.txt 没有阻止重要页面\n\nrobots.txt 是网站告知搜索引擎(如 Google 及其爬虫)哪些内容可以访问、哪些不能访问的方式。\n\n查看实践站点的文件:\n\n```\ncurl -s http://localhost:8080/robots.txt\n```\n\n```\nUser-agent: *\nDisallow: /blog\n```\n\nDisallow: /blog 是危险的,因为它阻止爬虫访问所有以 /blog 开头的路径。而通常,你的文章内容是推动网站流量的主要因素。\n\nGoogle 的 robots.txt 文档提供了类似的示例:Disallow: /fish 也会阻止 /fish.html 和 /fishheads。\n\n要修复这个问题,应仅阻止你本意要阻止的内容,例如草稿文件夹:\n\n```\nUser-agent: *\nDisallow: /blog-drafts/\n```\n\n在实践站点中,修改 '/robots.txt' 条目的 html 行:\n\n```\nhtml: 'User-agent: *\\nDisallow: /blog-drafts/\\n',\n```\n\nrobots.txt 控制的是爬虫抓取行为,而非索引。Google 表示这不是阻止页面出现在 Google 中的机制。若要实现此目的,需要使用 noindex。\n\n即使某个 URL 被 robots.txt 阻止,它仍可能出现在搜索结果中(通常没有描述),如果其他页面链接到它。Google 只是永远不会读取该页面的内容。\n\n## 如何发现意外的 noindex\n\nnoindex 告诉 Google 不要索引特定页面。当它出现在您希望被索引和排名的页面(如产品页面或首页)时会产生负面影响。\n\n但在您不希望被排名的页面,或对网站贡献较小的页面(如登录、注册页面)上,它可以发挥积极作用。\n\n只有当爬虫能够访问页面并读取规则时,noindex 才会生效。如果 robots.txt 阻止了相同 URL,Google 将永远看不到 noindex,页面仍可能出现在搜索结果中。因此,若希望某页面不在 Google 中显示,请使用 noindex 并确保页面可被爬虫访问。\n\n在数据中,457 个审计页面中有 11 个(2.4%)包含 noindex robots 元标签。设置该标签有两种方式,需要检查两者。\n\n### 如何检查 Robots 元标签\n\n第一种方式是页面 \u003chead\u003e 中的标签:\n\n```\n\u003cmeta name=\"robots\" content=\"noindex\"\u003e\n```\n\n在页面中搜索该词:\n\n```\ncurl -s http://localhost:8080/about | grep -i noindex\n```\n\n在关于页面中,这会输出空内容。您也可以右键点击页面,选择“查看页面源代码”,然后搜索 noindex。\n\n修复 noindex 非常简单。您只需将其删除,搜索引擎即可索引页面。\n\n在页面代码或模板中查找该标签,并检查 CMS 或 SEO 插件设置。在 WordPress 中,“Discourage search engines from indexing this site” 设置会将该标签添加到每个页面。\n\n### 如何检查 X-Robots-Tag 请求头\n\n第二种方式是 HTTP 请求头。检查关于页面的请求头:\n\n```\ncurl -sI http://localhost:8080/about\n```\n\n```\nHTTP/1.1 200 OK\nContent-Type: text/html; charset=utf-8\nX-Robots-Tag: noindex\nDate: Sun, 25 Oct 2026 17:42:59 GMT\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n该请求头不会出现在“查看页面源代码”中,只会出现在响应头中。在数据中,12 个被阻止页面中有 5 个 HTML 中没有 noindex:其中 2 个有此请求头,3 个被 robots.txt 阻止爬取。\n\n在实践站点中修复此问题,需从 '/about' 条目中删除请求头行。在真实站点中,需检查服务器配置、托管提供商的请求头设置以及任何 SEO 插件。\n\n## 如何正确使用规范标签\n\n如果您有多个页面讨论大致相同的内容,但内容不足以形成差异,您需要指定一个主页面。规范标签会告诉搜索引擎哪个页面是主页面。\n\n同一页面可能有多个地址:\n\n```\nhttps://example.com/blog/choosing-trail-shoes\nhttps://example.com/blog/choosing-trail-shoes?utm_source=newsletter\nhttps://www.example.com/blog/choosing-trail-shoes\n```\n\n这三个地址显示的是同一篇文章。第一个是主地址:您希望 Google 在搜索结果中显示的地址。因此,所有三个地址都包含相同的规范标签,指向该主页面:\n\n```\n\u003clink rel=\"canonical\" href=\"https://example.com/blog/choosing-trail-shoes\"\u003e\n```\n\n当 Google 在 ?utm_source=newsletter 版本上看到此标签时,它会知道该页面是第一个地址的副本。主地址携带相同的标签,指向自身。这称为自引用规范标签,表示:“我是主版本”。\n\nGoogle 将其视为一个强烈信号,而非强制命令。如果您使用规范标签,每个主页面使用自引用规范标签是一种良好实践,Google 也推荐这样做。\n\n但你根本不需要使用规范标签。Google 表示指定规范标签并不是强制要求:如果没有规范标签,Google 会自行选择它认为最适合展示给用户的版本。当同一内容或非常相似的内容可以通过多个 URL 访问时(例如上面的三个地址),规范标签是一个不错的选择。\n\n这就是为什么缺少规范标签本身并不构成缺陷。在数据中,457 个被审计页面中有 27.1% 没有规范标签。真正重要的是这些页面是否存在重复内容,例如带有跟踪参数的版本,这些内容可能需要规范标签。\n\n查看实践网站的徒步鞋文章:\n\n```\ncurl -s http://localhost:8080/blog/choosing-trail-shoes | grep -i canonical\n```\n\n```\n\u003clink rel=\"canonical\" href=\"http://localhost:8080/\"\u003e\n```\n\n该文章将主页设为主版本,因此 Google 可能选择展示主页而非该文章,或忽略该标签。\n\n该文章内容是原创的,因此它本身应作为主版本。要修复这个问题,请将文章的规范标签指向文章本身:\n\n```\ncanonical: '/blog/choosing-trail-shoes',\n```\n\n## 如何修复缺失或重复的标题和元描述\n\n优秀的标题或元描述应长度适中、不过载,并能简洁地说明页面内容。它某种程度上是页面的核心,就像页面的简介。\n\n查看 Blue Runner 产品页面:\n\n```\ncurl -s http://localhost:8080/products/blue-runner | grep -i -E \"\u003ctitle\u003e|name=\\\"description\\\"\"\n```\n\n```\n\u003ctitle\u003eAcme Shoes\u003c/title\u003e\n```\n\n该标题对页面内容没有任何说明,且完全没有描述信息。在 PowerShell 中,可以使用 | Select-String '\u003ctitle\u003e|name=\"description\"' 来查找此类问题。\n\nGoogle 关于标题和摘要的指南要求每一页都应有独特且具有描述性的标题和描述。\n\n在实践网站中修复此问题,将 '/products/blue-runner' 条目中的标题行替换为:\n\n```\ntitle: 'Blue Runner Road Running Shoe | Acme Shoes',\ndescription: 'A lightweight road running shoe with a cushioned sole and free returns.',\n```\n\n## 如何使链接可爬取\n\n查看实践网站的主页:\n\n```\ncurl -s http://localhost:8080/\n```\n\n```\n\u003c!doctype html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003ctitle\u003eAcme Shoes: Running Shoes for Every Runner\u003c/title\u003e\n\u003cmeta name=\"description\" content=\"Lightweight running shoes for road and trail, with free returns.\"\u003e\n\u003clink rel=\"canonical\" href=\"http://localhost:8080/\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003ch1\u003eAcme Shoes\u003c/h1\u003e\n\u003ca href=\"/products/blue-runner\"\u003eBlue Runner\u003c/a\u003e\n\u003cspan onclick=\"location.href='/sale'\"\u003eSummer sale\u003c/span\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n该页面的其他内容都很好:标题、描述、规范标签以及 Blue Runner 链接(这是一个带有 href 的真实 \u003ca\u003e 元素)。唯一的问题是 \"Summer sale\" 这个 \u003cspan\u003e 元素。\n\n\u003cspan\u003e 基本上是非语义化的 HTML 元素,意味着它没有实际意义。真正的链接确实有含义:搜索引擎可以理解这是一个链接,屏幕阅读器也能识别这是一个链接。\n\n哪些链接需要可爬取?基本上是你希望搜索引擎看到的一切。我的意思是你要销售的产品、你的文章、你的课程以及其他类似的内容。\n\nGoogle 的链接指南指出,它只能可靠地爬取带有 href 属性的 \u003ca\u003e 元素。\n\n在实践网站中修复此问题,将 \u003cspan\u003e 行替换为:\n\n```\n'\u003ca href=\"/sale\"\u003eSummer sale\u003c/a\u003e',\n```\n\n## 如何检查内容是否需要 JavaScript 才能显示\n\n在客户端渲染中,JavaScript 必须首先加载,之后其他内容才能加载。\n\nJavaScript 通常用于构建产品列表、价格、评论和菜单等内容。没有它时,客户端页面通常只会显示加载信息或空白框。\n\n谷歌确实会渲染 JavaScript,但会在稍后的阶段进行。页面会进入渲染队列,可能需要几秒甚至更长时间,而脚本如果失败或被阻塞,可能导致渲染后的页面缺少内容。\n\n这就是为什么服务器端渲染仍然是一个好主意,也是我更倾向于用于重要内容的方式。谷歌的 JavaScript 指南也持相同观点:服务器端渲染能为用户和爬虫提供更快的网站体验,并非所有爬虫都能运行 JavaScript。\n\n数据显示,在 277 个被审核的页面中,17.7% 的页面主要由 JavaScript 构建。这并不意味着谷歌无法抓取这些页面,只是说明它们的主要内容依赖于 JavaScript 正确运行。\n\n通过服务器端渲染,HTML 内容会直接发送到浏览器,之后才会执行 JavaScript 渲染。\n\n谷歌可以抓取通过这两种方式构建的页面。其爬虫使用最新版 Chrome 运行 JavaScript,因此服务器端渲染并不是进入谷歌索引的必要条件。\n\n下一个测试检查重要内容是否在没有 JavaScript 的情况下可见。它不会显示谷歌看到的内容(因为谷歌会运行 JavaScript),但会显示所有爬虫在 JavaScript 执行前看到的内容。\n\n在浏览器中打开 http://localhost:8080/catalog。你会看到三个产品。现在使用不运行 JavaScript 的 curl 下载页面:\n\n```\ncurl -s http://localhost:8080/catalog | grep -i \"trail grip\"\n```\n\n这不会输出任何内容,因为产品名称不在服务器发送的 HTML 中。在 `\u003cbody\u003e` 中,服务器只发送:\n\n```\n\u003cdiv id=\"app\"\u003eLoading...\u003c/div\u003e\n\u003cscript\u003efetch('/api/products').then((r) =\u003e r.json()).then((products) =\u003e {document.getElementById('app').innerHTML = products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('');});\u003c/script\u003e\n```\n\n如果不使用 curl,可以在浏览器中使用“查看页面源代码”功能。在这个页面上,你会看到 \"Loading...\" 和脚本,但看不到产品名称,因为浏览器只有在 JavaScript 执行后才会添加它们。\n\n在你自己的网站上,搜索页面源代码中的一句重要内容。\n\n要查看谷歌渲染页面的方式,可以使用谷歌自己的工具对实时页面进行测试。在你自己的网站上,搜索控制台中的 URL 检查工具(Test live URL,然后 View tested page)可以运行实时测试,并显示谷歌渲染的 HTML 和截图。\n\n对于任何公开页面,丰富结果测试(Rich Results Test)也会显示渲染后的 HTML。谷歌推荐两者都用于查找 JavaScript 问题。两者都无法访问 localhost,因此请在你的真实网站上尝试。\n\n如果你想从一开始就在 HTML 中显示产品名称,请在服务器端渲染它们。在示例网站中,将产品列表添加到路由上方:\n\n```\nconst products = ['Blue Runner', 'Trail Grip 2', 'City Glide'];\n```\n\n将 catalog 的 body 和 script 行替换为:\n\n```\nbody: '\u003cdiv id=\"app\"\u003e' + products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('') + '\u003c/div\u003e',\n```\n\n并在 '/api/products' 入口处:\n\n```\nhtml: JSON.stringify(products),\n```\n\n重启服务器并再次运行 curl 命令:\n\n```\n\u003cdiv id=\"app\"\u003e\u003ch2\u003eBlue Runner\u003c/h2\u003e\u003ch2\u003eTrail Grip 2\u003c/h2\u003e\u003ch2\u003eCity Glide\u003c/h2\u003e\u003c/div\u003e\n```\n\n这之所以有效,是因为服务器现在在发送页面前就将产品名称写入 HTML。任何爬虫都能看到这些内容,即使它们无法运行 JavaScript,你仍然可以使用 JavaScript 实现交互功能。\n\n## 五分钟内能检查页面吗?\n\n说实话,这非常困难。可能会出现很多问题,五分钟的时间远远不够。\n\n要真正了解具体存在哪些问题,你需要运行完整的检查,例如在Google PageSpeed Insights中进行检查。如果网站属于你本人,还可以使用Google Search Console中的URL检查工具。\n\n本教程中的命令是一个不错的起点:\n\n- 使用curl -sI检查状态码和X-Robots-Tag头信息。\n\n- 使用curl -sIL检查旧地址以统计重定向次数。\n\n- 逐行查看/robots.txt文件。\n\n- 在页面源代码中检查noindex标签、canonical标签、\u003ctitle\u003e标签、描述信息和重要内容。\n\n## 结论\n\n在本教程中,你修复了实践网站上的八个问题:软404错误、重定向链、robots.txt规则、隐藏的noindex头信息、错误的canonical标签、模糊的标题和缺失的描述、爬虫无法追踪的链接,以及需要JavaScript才能访问的内容。\n\n最重要的是,你需要持续检查网站。定期运行扫描,进行维护,确保网站功能正常,尤其是在对网站进行优化或更改时。\n\n如果你想更进一步,我关于在Next.js网站中添加结构化数据(JSON-LD)的教程是一个不错的下一步选择。\n\n如果你想一次性检查实时页面的多个问题,我的免费工具Greadme Page Audit可以无需注册直接测试任何URL。\n\n推荐课程(合作伙伴推荐,1/5)\n\n(在新标签页中打开)\n\n广告\n\n- Coursera 2026 Google Search Console:#1 SEO工具用于跟踪SEO Alex Genadinik 2小时 初学者 证书 查看课程(在新标签页中打开)\n\n- Udemy SEO 2027:如何在Google上排名第一 - 最终SEO课程 iMarket XL和Matt Jensen 4.3(1,883) 4小时48分钟 初学者 证书 查看课程(在新标签页中打开)\n\n- Udemy SEO:亚马逊联盟营销+SEO |250+视频 |18.0小时 The SEO Academy SEO教育领导者 4.5(3,420) 20小时6分钟 初学者 证书 查看课程(在新标签页中打开)\n\n- Skillshare SEO 2024:SEO入门 Arkadiusz Włodarczyk 4.3(10) 2小时54分钟 初学者 查看课程(在新标签页中打开)\n\n更多SEO课程请查看Class Central\n\n→\n\n推荐课程(合作伙伴推荐,2/5)\n\n- Udemy 从零开始学习高级SEO,完整SEO培训课程 Debajyoti Banerjee 4.2(1,772) 10小时51分钟 初学者 查看课程(在新标签页中打开)\n\n- Skillshare SEO审计 - 学习如何发现和修复网站上最常见的SEO问题 Joshua George 4.6(54) 1小时58分钟 初学者 查看课程(在新标签页中打开)\n\n- Skillshare SEO Google:SEO基础:WordPress SEO入门 Jim Bruce 4.4(26) 1小时26分钟 初学者 查看课程(在新标签页中打开)\n\n- Udemy SEO入门教程 Daragh Walsh 4.5(33,729) 45分钟 初学者 查看课程(在新标签页中打开)\n\n推荐课程(合作伙伴推荐,3/5)\n\n- Coursera 使用HTML \u0026 CSS创建多页应用 Omnya Khaled 4.2(14) 1小时55分钟 初学者 证书 查看课程(在新标签页中打开)\n\n- Coursera 搜索引擎优化课程 LearnKartS和Tanmoy Kumar Das 6周,每周3小时 初学者 证书 查看课程(在新标签页中打开)\n\n合作伙伴推荐课程(侧边栏,第4部分共5部分)\n\n合作伙伴推荐课程(侧边栏,第5部分共5部分)\n\n我是一名软件开发人员和SEO专家,热爱构建真正满足人们需求的产品。我喜欢将想法转化为实际产品,探索新技术并在过程中不断学习。我也热衷于与其他开发者分享所学知识。\n\n如果你读到这里,请向作者表达感谢以示支持。说声谢谢\n\n免费学习编程。freeCodeCamp的开源课程已帮助超过40,000人成为开发者。立即开始\n\n合作伙伴推荐课程"])</script><script>self.__next_f.push([1,"1c:[\"$\",\"article\",null,{\"className\":\"mx-auto max-w-3xl\",\"children\":[[\"$\",\"div\",null,{\"className\":\"mb-6 flex flex-wrap items-center gap-2 text-[13px] font-medium text-slate-500\",\"children\":[[\"$\",\"span\",null,{\"className\":\"rounded-md bg-slate-100 px-2 py-1 text-slate-700\",\"children\":\"freeCodeCamp.org\"}],[\"$\",\"span\",null,{\"aria-hidden\":\"true\",\"children\":\"·\"}],[\"$\",\"time\",null,{\"dateTime\":\"2026-11-03T19:00:29+00:00\",\"children\":\"2026年11月3日\"}]]}],[\"$\",\"div\",null,{\"className\":\"mb-5 flex items-start justify-between gap-4\",\"children\":[[\"$\",\"h1\",null,{\"className\":\"text-[30px] font-black leading-tight text-slate-950 sm:text-[38px]\",\"children\":\"How to Find and Fix Common Technical SEO Issues on Your Website\"}],[\"$\",\"div\",null,{\"aria-label\":\"内容质量分 7.1\",\"className\":\"flex shrink-0 items-center gap-1.5 rounded-md border border-amber-200 bg-amber-50 px-2.5 py-1 text-amber-800\",\"title\":\"内容质量分 7.1\",\"children\":[[\"$\",\"span\",null,{\"className\":\"font-mono text-[15px] font-bold leading-none\",\"children\":\"7.1\"}],[\"$\",\"span\",null,{\"className\":\"text-[11px] font-semibold\",\"children\":\"内容质量\"}]]}]]}],[\"$\",\"div\",null,{\"className\":\"mb-6 flex flex-wrap items-center gap-2\",\"children\":[[\"$\",\"$L1e\",null,{\"articleId\":\"75786002-fd1d-4153-8a9c-95e923c4269b\",\"className\":\"px-3 py-2 text-[13px]\",\"contentType\":\"article\",\"imageUrl\":null,\"sourceName\":\"freeCodeCamp.org\",\"summary\":\"How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built...\",\"title\":\"How to Find and Fix Common Technical SEO Issues on Your Website\",\"url\":\"https://www.freecodecamp.org/news/fix-common-technical-seo-issues/\"}],[\"$\",\"$L1f\",null,{\"articleId\":\"75786002-fd1d-4153-8a9c-95e923c4269b\",\"className\":\"px-3 py-2 text-[13px]\",\"summary\":\"How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built...\",\"title\":\"How to Find and Fix Common Technical SEO Issues on Your Website\"}]]}],null,[\"$\",\"$L20\",null,{\"article\":{\"id\":\"75786002-fd1d-4153-8a9c-95e923c4269b\",\"source_name\":\"freeCodeCamp.org\",\"title\":\"How to Find and Fix Common Technical SEO Issues on Your Website\",\"url\":\"https://www.freecodecamp.org/news/fix-common-technical-seo-issues/\",\"score\":7.1,\"summary\":\"How to Find and Fix Common Technical SEO Issues on Your Website November 3, 2026 / SEO Saar Twito Let's say you've built...\",\"takeaways\":[\"主题聚焦:How to Find and Fix Common Technical SEO Issues \",\"来源:freeCodeCamp.org,建议结合原文判断细节。\",\"AI 分析暂不可用,本条为保底评分与摘要。\"],\"tags\":[\"AI\",\"编程\",\"前端\",\"后端\",\"安全\"],\"image_url\":null,\"word_count\":5733,\"reading_minutes\":23,\"language\":\"英文\",\"content_markdown\":\"$21\",\"content_r2_key\":\"articles/content/2026-11-03/freecodecamp.org/0fe94f2240cb2e4082763c825684d214.md\",\"content_storage_provider\":\"r2\",\"content_byte_size\":33964,\"content_type\":\"article\",\"audio_url\":null,\"audio_mime_type\":null,\"audio_duration_seconds\":null,\"podcast_chapters\":[],\"podcast_transcript\":[],\"outline\":null,\"highlights\":null,\"mindmap\":null,\"translations\":{\"zh\":{\"title\":\"\",\"summary\":\"\",\"takeaways\":[],\"tags\":[],\"content_r2_key\":\"articles/content/2026-11-03/freecodecamp.org/0fe94f2240cb2e4082763c825684d214-zh.md\",\"outline\":null,\"highlights\":null},\"en\":{\"title\":\"\",\"summary\":\"\",\"takeaways\":[],\"tags\":[],\"content_r2_key\":\"articles/content/2026-11-03/freecodecamp.org/0fe94f2240cb2e4082763c825684d214.md\",\"outline\":null,\"highlights\":null}},\"published_at\":\"2026-11-03T19:00:29+00:00\",\"created_at\":\"2026-11-04T02:53:14.917689+00:00\"},\"variant\":\"article\"}],\"$L22\",\"$L23\",\"$L24\",\"$L25\",\"$L26\",\"$L27\",\"$L28\"]}]\n"])</script><script>self.__next_f.push([1,"29:I[32679,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"default\"]\nfb:I[7929,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"ArticleChatFloat\"]\nfc:I[41535,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"AiDigestMeta\"]\n22:null\n23:null\n24:null\n"])</script><script>self.__next_f.push([1,"25:[\"$\",\"div\",null,{\"className\":\"mb-8 flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 pb-6\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex flex-wrap gap-2\",\"children\":[[\"$\",\"span\",\"AI\",{\"className\":\"rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600\",\"children\":[\"#\",\"AI\"]}],[\"$\",\"span\",\"编程\",{\"className\":\"rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600\",\"children\":[\"#\",\"编程\"]}],[\"$\",\"span\",\"前端\",{\"className\":\"rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600\",\"children\":[\"#\",\"前端\"]}],[\"$\",\"span\",\"后端\",{\"className\":\"rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600\",\"children\":[\"#\",\"后端\"]}],[\"$\",\"span\",\"安全\",{\"className\":\"rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] font-medium text-slate-600\",\"children\":[\"#\",\"安全\"]}]]}],[\"$\",\"a\",null,{\"className\":\"inline-flex items-center gap-2 rounded-md border border-slate-200 px-3 py-2 text-[13px] font-semibold text-slate-600 hover:border-cyan-200 hover:text-cyan-700\",\"href\":\"https://www.freecodecamp.org/news/fix-common-technical-seo-issues/\",\"rel\":\"noopener noreferrer\",\"target\":\"_blank\",\"children\":[\"打开原文\",[\"$\",\"$L29\",null,{\"ref\":\"$undefined\",\"iconNode\":[[\"path\",{\"d\":\"M15 3h6v6\",\"key\":\"1q9fwt\"}],[\"path\",{\"d\":\"M10 14 21 3\",\"key\":\"gplh6r\"}],[\"path\",{\"d\":\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\",\"key\":\"a6xqqp\"}]],\"className\":\"lucide-external-link h-3.5 w-3.5\",\"aria-hidden\":\"true\"}]]}]]}]\n"])</script><script>self.__next_f.push([1,"26:[\"$\",\"div\",null,{\"children\":[[\"$\",\"h2\",\"h1-0\",{\"className\":\"mt-10 mb-3 text-[24px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何发现并修复网站上的常见技术SEO问题\"}],[\"$\",\"p\",\"p-3\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"2026年11月3日\"]}],[\"$\",\"p\",\"p-5\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"/\"]}],[\"$\",\"p\",\"p-7\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"#SEO\"]}],[\"$\",\"p\",\"p-9\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"Saar Twito\"]}],[\"$\",\"p\",\"p-11\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"假设你已经搭建了一个网站。你投入了设计,购买了域名,等等。但网站不仅仅是屏幕上看到的内容。幕后还有很多事情在发生。你需要了解互联网的工作原理,以及搜索引擎优化(SEO)的运作方式。\"]}],[\"$\",\"p\",\"p-13\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"速度也是其中的关键部分。一个加载缓慢的网站可能会有非常弱的SEO效果,因为大多数人不会花太多时间等待页面加载,尤其是在现在这个时代。\"]}],[\"$\",\"p\",\"p-15\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"网站速度是一个广为人知的话题,本身有许多需要考虑的问题,例如最大内容绘制(LCP)、累积布局偏移(CLS)和服务器速度。但我会在另一篇文章中详细讨论这些内容。\"]}],[\"$\",\"p\",\"p-17\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"本文重点介绍阻止搜索引擎访问和读取你页面的问题。\"]}],[\"$\",\"p\",\"p-19\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在我看来,技术SEO比常规SEO(侧重于内容和关键词)更难实施。技术方面通常需要开发者的知识,如果没有技术背景,可能需要进行一些令人不太舒服的更改。\"]}],[\"$\",\"p\",\"p-21\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"技术问题可能在数月内都未被发现,因为通常你看不到它。这不是设计问题。你只有在运行特定检查时才能发现它,例如使用Google PageSpeed Insights。\"]}],[\"$\",\"p\",\"p-23\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在本教程中,你将发现并修复小型练习网站上最常见的问题。我不想使用真实网站并让其所有者感到尴尬,因此我搭建了一个已经包含这些问题的练习网站。\"]}],[\"$\",\"h3\",\"h2-24\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"目录\"}],[\"$\",\"ul\",\"ul-27\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"先决条件\"]}]]}],[\"$\",\"ul\",\"ul-29\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"什么是技术SEO?\"]}]]}],[\"$\",\"ul\",\"ul-31\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"这些问题在真实网站上有多常见?\"]}]]}],[\"$\",\"ul\",\"ul-33\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"如何设置练习网站\"]}]]}],[\"$\",\"ul\",\"ul-35\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"如何检查页面的HTTP状态码 什么是软404?\"]}]]}],[\"$\",\"ul\",\"ul-37\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"如何发现并修复重定向链\"]}]]}],[\"$\",\"ul\",\"ul-39\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"如何确保robots.txt没有阻止重要页面\"]}]]}],[\"$\",\"ul\",\"ul-41\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"如何发现意外的noindex 如何检查robots元标签 如何检查X-Robots-Tag头\"]}]]}],[\"$\",\"ul\",\"ul-43\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"如何正确使用规范标签\"]}]]}],[\"$\",\"ul\",\"ul-45\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"如何修复缺失和重复的标题和元描述\"]}]]}],[\"$\",\"ul\",\"ul-47\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[\"$L2a\"]}],\"$L2b\",\"$L2c\",\"$L2d\",\"$L2e\",\"$L2f\",\"$L30\",\"$L31\",\"$L32\",\"$L33\",\"$L34\",\"$L35\",\"$L36\",\"$L37\",\"$L38\",\"$L39\",\"$L3a\",\"$L3b\",\"$L3c\",\"$L3d\",\"$L3e\",\"$L3f\",\"$L40\",\"$L41\",\"$L42\",\"$L43\",\"$L44\",\"$L45\",\"$L46\",\"$L47\",\"$L48\",\"$L49\",\"$L4a\",\"$L4b\",\"$L4c\",\"$L4d\",\"$L4e\",\"$L4f\",\"$L50\",\"$L51\",\"$L52\",\"$L53\",\"$L54\",\"$L55\",\"$L56\",\"$L57\",\"$L58\",\"$L59\",\"$L5a\",\"$L5b\",\"$L5c\",\"$L5d\",\"$L5e\",\"$L5f\",\"$L60\",\"$L61\",\"$L62\",\"$L63\",\"$L64\",\"$L65\",\"$L66\",\"$L67\",\"$L68\",\"$L69\",\"$L6a\",\"$L6b\",\"$L6c\",\"$L6d\",\"$L6e\",\"$L6f\",\"$L70\",\"$L71\",\"$L72\",\"$L73\",\"$L74\",\"$L75\",\"$L76\",\"$L77\",\"$L78\",\"$L79\",\"$L7a\",\"$L7b\",\"$L7c\",\"$L7d\",\"$L7e\",\"$L7f\",\"$L80\",\"$L81\",\"$L82\",\"$L83\",\"$L84\",\"$L85\",\"$L86\",\"$L87\",\"$L88\",\"$L89\",\"$L8a\",\"$L8b\",\"$L8c\",\"$L8d\",\"$L8e\",\"$L8f\",\"$L90\",\"$L91\",\"$L92\",\"$L93\",\"$L94\",\"$L95\",\"$L96\",\"$L97\",\"$L98\",\"$L99\",\"$L9a\",\"$L9b\",\"$L9c\",\"$L9d\",\"$L9e\",\"$L9f\",\"$La0\",\"$La1\",\"$La2\",\"$La3\",\"$La4\",\"$La5\",\"$La6\",\"$La7\",\"$La8\",\"$La9\",\"$Laa\",\"$Lab\",\"$Lac\",\"$Lad\",\"$Lae\",\"$Laf\",\"$Lb0\",\"$Lb1\",\"$Lb2\",\"$Lb3\",\"$Lb4\",\"$Lb5\",\"$Lb6\",\"$Lb7\",\"$Lb8\",\"$Lb9\",\"$Lba\",\"$Lbb\",\"$Lbc\",\"$Lbd\",\"$Lbe\",\"$Lbf\",\"$Lc0\",\"$Lc1\",\"$Lc2\",\"$Lc3\",\"$Lc4\",\"$Lc5\",\"$Lc6\",\"$Lc7\",\"$Lc8\",\"$Lc9\",\"$Lca\",\"$Lcb\",\"$Lcc\",\"$Lcd\",\"$Lce\",\"$Lcf\",\"$Ld0\",\"$Ld1\",\"$Ld2\",\"$Ld3\",\"$Ld4\",\"$Ld5\",\"$Ld6\",\"$Ld7\",\"$Ld8\",\"$Ld9\",\"$Lda\",\"$Ldb\",\"$Ldc\",\"$Ldd\",\"$Lde\",\"$Ldf\",\"$Le0\",\"$Le1\",\"$Le2\",\"$Le3\",\"$Le4\",\"$Le5\",\"$Le6\",\"$Le7\",\"$Le8\",\"$Le9\",\"$Lea\",\"$Leb\",\"$Lec\",\"$Led\",\"$Lee\",\"$Lef\",\"$Lf0\",\"$Lf1\",\"$Lf2\",\"$Lf3\",\"$Lf4\",\"$Lf5\",\"$Lf6\",\"$Lf7\",\"$Lf8\",\"$Lf9\",\"$Lfa\"]}]\n"])</script><script>self.__next_f.push([1,"27:[\"$\",\"$Lfb\",null,{\"articleId\":\"75786002-fd1d-4153-8a9c-95e923c4269b\"}]\n28:[\"$\",\"$Lfc\",null,{\"article\":\"$1c:props:children:4:props:article\"}]\n"])</script><script>self.__next_f.push([1,"fd:I[91746,[\"1562\",\"static/chunks/ed027683-fb3d1010fb1dd056.js\",\"48\",\"static/chunks/48-081bd7173bc0d1b7.js\",\"299\",\"static/chunks/299-adffce14862fb047.js\",\"2659\",\"static/chunks/2659-e618985a38010c5a.js\",\"1312\",\"static/chunks/1312-59cbdfb1752d5335.js\",\"4137\",\"static/chunks/app/%5Blocale%5D/articles/%5Bid%5D/page-63996a2c334b7d86.js\"],\"CodeBlock\"]\n2a:[\"$\",\"li\",\"0\",{\"children\":[\"如何使链接可爬取\"]}]\n2b:[\"$\",\"ul\",\"ul-49\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"如何检查内容是否需要JavaScript才能显示\"]}]]}]\n2c:[\"$\",\"ul\",\"ul-51\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"五分钟内能否检查页面?\"]}]]}]\n2d:[\"$\",\"ul\",\"ul-53\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"结论\"]}]]}]\n2e:[\"$\",\"h3\",\"h2-54\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"先决条件\"}]\n2f:[\"$\",\"p\",\"p-57\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"你不需要是经验丰富的程序员也能跟上教程。你需要:\"]}]\n30:[\"$\",\"ul\",\"ul-59\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"一个网络浏览器,如Chrome、Firefox、Edge或Safari。在Safari中,首先在“设置”\u003e“高级”中启用“显示Web开发者功能”。\"]}]]}]\n31:[\"$\",\"ul\",\"ul-61\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"一个终端:macOS上的终端,Windows上的PowerShell,或Linux上的任何终端。\"]}]]}]\n32:[\"$\",\"ul\",\"ul-63\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"curl,一个下载网页的小程序。它包含在macOS、大多数Linux发行版以及Windows 10(1803版本及更高版本)和Windows 11中。\"]}]]}]\n33:[\"$\",\"ul\",\"ul-65\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Node.js,用于运行练习网站。代码在Node.js 26.8和curl 8.7上进行了测试。\"]}]]}]\n34:[\"$\",\"p\",\"p-67\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在Windows PowerShell中,使用curl.exe而不是curl,因为在Windows中curl是另一个命令的快捷方式。将 | grep -i \\\"text\\\" 替换为 | Select-String \\\"text\\\",并将 /dev/null 替换为 NUL。\"]}]\n35:[\"$\",\"p\",\"p-69\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"如果 Google 认定某页面值得收录,可能会将其添加到一个庞大的网页数据库中,这个数据库称为索引。Google 可以在搜索结果中考虑其索引中的页面,当这些页面与用户的搜索内容相关时。Google 关于搜索工作原理的指南将这三个步骤称为抓取、索引和提供。\"]}]\n36:[\"$\",\"p\",\"p-71\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"抓取并不保证索引,索引也不保证出现在搜索结果中。同一篇指南指出,即使页面完全遵循 Google 的规则,Google 也无法保证这三个阶段中的任何一阶段。\"]}]\n37:[\"$\",\"p\",\"p-73\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"修复技术问题不一定能让您的网站在 Google 上排名第一。但修复问题确实能提高排名的可能性,因为每解决一个问题,网站本身就会变得更好。\"]}]\n38:[\"$\",\"p\",\"p-75\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"技术 SEO 必须与常规 SEO 结合,例如关键词、反向链接、社交媒体互动等。\"]}]\n39:[\"$\",\"h3\","])</script><script>self.__next_f.push([1,"\"h2-76\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"这些问题在真实网站中有多常见?\"}]\n3a:[\"$\",\"p\",\"p-79\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"以下数据来自我开发的网站审计工具运行的审计结果。每个网站仅计算一次,使用的是其首次审计的数据,数据日期为 10 月 25 日。\"]}]\n3b:[\"$\",\"p\",\"p-81\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"爬虫会检查一个网站上的许多页面(此处中位数为 10 页)。单页审计通常检查首页,一次只检查一页。\"]}]\n3c:[\"$\",\"p\",\"p-93\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"问题 | 出现频率 | 示例 --- | --- | --- 至少有一个页面没有规范标签 | 64.2% 的网站 | 53 个爬取的网站,2025 年 8 月至 2026 年 10 月 两个或更多页面标题完全相同 | 61.8% 的网站 | 34 个爬取的网站,其中两个或更多页面加载成功 至少有一个页面没有元描述 | 49.1% 的网站 | 53 个爬取的网站 至少有一个链接指向返回 404 的页面 | 18.9% 的网站 | 页面主要由 JavaScript 构建 | 17.7% 的页面 | 277 次单页审计,2026 年 5 月至 10 月 至少有一个页面没有标题 | 13.2% 的网站 | 搜索引擎可能无法追踪的链接 | 8.3% 的页面 | 278 次单页审计 包含错误的 robots.txt 文件或加载失败的文件 | 7.9% 的网站 | 252 次单页审计,2026 年 7 月至 10 月 页面被 noindex 或 robots.txt 阻止 | 4.8% 的页面 | 251 次单页审计,2026 年 7 月至 10 月\"]}]\n3d:[\"$\",\"p\",\"p-95\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"这些都是技术问题,但它们的重要性并不相同。缺少规范标签的问题最为常见,但 Google 并不要求必须使用规范标签,因此缺少规范标签的页面本身并不算损坏。当相同或非常相似的内容可以通过多个 URL 访问时,这个问题才会变得重要,这将在规范标签部分进一步说明。\"]}]\n3e:[\"$\",\"p\",\"p-97\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"重复标题是我自己也遇到过的问题:编写代码时,很容易忽略这类问题。这就是为什么有工具可以检查这些问题。\"]}]\n3f:[\"$\",\"p\",\"p-99\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"让我们逐一查看表格中的每个问题,确保它们都清晰明了:\"]}]\n40:[\"$\",\"ul\",\"ul-101\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[[\"$\",\"strong\",\"ul-101-0-b-0\",{\"className\":\"font-semibold text-slate-900\",\"children\":\"缺少规范标签\"}],\":规范标签是您在 HTML 的 \",[\"$\",\"code\",\"ul-101-0-c-26\",{\"className\":\"rounded bg-slate-100 px-1.5 py-0.5 text-[14px] font-mono text-slate-800\",\"children\":\"\u003chead\u003e\"}],\" 部分放置的众多标签之一。当两到三页的内容几乎完全相同时,它会告诉搜索引擎(如 Google)哪个 URL 是原始的、主要的版本,也就是您希望被收录的版本。虽然这不是强制要求,但如果没有规范标签,Google 会自行选择主要版本,因此这个问题主要影响存在重复页面的情况。\"]}]]}]\n41:[\"$\",\"ul\",\"ul-103\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[[\"$\",\"strong\",\"ul-103-0-b-0\",{\"className\":\"font-semibold text-slate-900\",\"children\":\"重复标题\"}],\":在两个页面上出现相同的标题其实非常容易。您不希望出现重复标题,因为这不仅没有帮助,还可能让 Google 感到困惑。每一页都应该明确说明其内容。\"]}]]}]\n42:[\"$\",\"ul\",\"ul-105\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"缺少元描述:这一点非常重"])</script><script>self.__next_f.push([1,"要,因为它不仅有助于搜索引擎,还能帮助像 ChatGPT 这样的 AI 工具。元描述的作用是简明扼要地说明页面内容和用途。如果你在 Google 上搜索某个网站,会看到它显示在实际链接下方。\"]}]]}]\n43:[\"$\",\"ul\",\"ul-107\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"指向 404 页面的链接:这意味着你存在一个失效链接(可能是你不再使用的链接),指向一个不存在的页面。因此,这个链接不应该指向不存在的内容,而是应引导到类似页面或真实存在的内容,以确保链接的相关性。\"]}]]}]\n44:[\"$\",\"ul\",\"ul-109\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"主要由 JavaScript 构建的页面:虽然 Google 可以运行 JavaScript,但这本身不会阻止页面被 Google 收录。但内容只有在 JavaScript 加载执行后才会显示,这会降低访问速度,并增加出错的可能性。并非所有爬虫都能执行 JavaScript,因此我更倾向于对重要内容使用服务端渲染。\"]}]]}]\n45:[\"$\",\"ul\",\"ul-111\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"搜索引擎无法追踪的链接:这不算大问题,具体影响取决于链接指向的位置。例如,如果我写了一篇很好的文章并希望它在 Google 上获得排名,但搜索引擎无法追踪到该链接,那么你投入大量时间和精力撰写的这篇文章可能只会被少数人看到。\"]}]]}]\n46:[\"$\",\"ul\",\"ul-113\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"robots.txt 文件中的错误:robots.txt 的作用是帮助你与搜索引擎沟通。如果该文件存在错误,可能会阻止搜索引擎爬取你希望出现在搜索结果中的页面。\"]}]]}]\n47:[\"$\",\"ul\",\"ul-115\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"被 noindex 或 robots.txt 屏蔽的页面:这是两种不同的情况。noindex 规则要求搜索引擎不要将页面收录到结果中,而 robots.txt 规则仅阻止搜索引擎爬取页面。你将在本教程后续部分了解更多关于这两者的区别及其重要性。\"]}]]}]\n48:[\"$\",\"p\",\"p-117\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"软性 404 错误、重定向链和错误的 canonical 标签未包含在表格中,因为审核工具不会记录这些问题。\"]}]\n49:[\"$\",\"h3\",\"h2-118\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何搭建练习网站\"}]\n4a:[\"$\",\"p\",\"p-121\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"练习网站是一个虚构鞋店 Acme Shoes 的小型网站。网站每一页都内置了一个问题。你不需要理解代码中的每一行。\"]}]\n4b:[\"$\",\"p\",\"p-123\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"创建一个新文件夹,添加一个名为 server.js 的文件,并粘贴以下代码:\"]}]\n"])</script><script>self.__next_f.push([1,"4c:[\"$\",\"$Lfd\",\"code-152\",{\"code\":\"// server.js: 一个包含常见技术 SEO 问题的小型练习网站\\nconst http = require('node:http');\\n\\nconst PORT = 8080;\\nconst BASE = 'http://localhost:' + PORT;\\n\\n// 构建一个简单的 HTML 页面。省略字段可省略对应标签\\nfunction page({ title, description, canonical, robots, body, script }) {\\n return [\\n '\u003c!doctype html\u003e',\\n '\u003chtml lang=\\\"en\\\"\u003e',\\n '\u003chead\u003e',\\n '\u003cmeta charset=\\\"utf-8\\\"\u003e',\\n title \u0026\u0026 '\u003ctitle\u003e' + title + '\u003c/title\u003e',\\n description \u0026\u0026 '\u003cmeta name=\\\"description\\\" content=\\\"' + description + '\\\"\u003e',\\n canonical \u0026\u0026 '\u003clink rel=\\\"canonical\\\" href=\\\"' + BASE + canonical + '\\\"\u003e',\\n robots \u0026\u0026 '\u003cmeta name=\\\"robots\\\" content=\\\"' + robots + '\\\"\u003e',\\n '\u003c/head\u003e',\\n '\u003cbody\u003e',\\n body,\\n script \u0026\u0026 '\u003cscript\u003e' + script + '\u003c/script\u003e',\\n '\u003c/body\u003e',\\n '\u003c/html\u003e',\\n ]\\n .filter(Boolean)\\n .join('\\\\n');\\n}\",\"lang\":\"$undefined\",\"children\":\"// server.js: 一个包含常见技术 SEO 问题的小型练习网站\\nconst http = require('node:http');\\n\\nconst PORT = 8080;\\nconst BASE = 'http://localhost:' + PORT;\\n\\n// 构建一个简单的 HTML 页面。省略字段可省略对应标签\\nfunction page({ title, description, canonical, robots, body, script }) {\\n return [\\n '\u003c!doctype html\u003e',\\n '\u003chtml lang=\\\"en\\\"\u003e',\\n '\u003chead\u003e',\\n '\u003cmeta charset=\\\"utf-8\\\"\u003e',\\n title \u0026\u0026 '\u003ctitle\u003e' + title + '\u003c/title\u003e',\\n description \u0026\u0026 '\u003cmeta name=\\\"description\\\" content=\\\"' + description + '\\\"\u003e',\\n canonical \u0026\u0026 '\u003clink rel=\\\"canonical\\\" href=\\\"' + BASE + canonical + '\\\"\u003e',\\n robots \u0026\u0026 '\u003cmeta name=\\\"robots\\\" content=\\\"' + robots + '\\\"\u003e',\\n '\u003c/head\u003e',\\n '\u003cbody\u003e',\\n body,\\n script \u0026\u0026 '\u003cscript\u003e' + script + '\u003c/script\u003e',\\n '\u003c/body\u003e',\\n '\u003c/html\u003e',\\n ]\\n .filter(Boolean)\\n .join('\\\\n');\\n}\"}]\n"])</script><script>self.__next_f.push([1,"fe:Tc07,"])</script><script>self.__next_f.push([1,"const routes = {\n '/': {\n html: page({\n\n description: '适用于道路和山径的轻便跑步鞋,提供免费退换货服务。',\n canonical: '/',\n body: [\n '\u003ch1\u003eAcme Shoes\u003c/h1\u003e',\n '\u003ca href=\"/products/blue-runner\"\u003eBlue Runner\u003c/a\u003e',\n '\u003cspan onclick=\"location.href=\\'/sale\\'\"\u003e夏季促销\u003c/span\u003e',\n ].join('\\n'),\n }),\n },\n // 问题:标题模糊且缺少元描述\n '/products/blue-runner': {\n html: page({\n\n canonical: '/products/blue-runner',\n body: '\u003ch1\u003eBlue Runner\u003c/h1\u003e',\n }),\n },\n // 问题:缺失的产品页面仍返回\"200 OK\"状态码(软404)\n '/products/red-runner': {\n html: page({\n\n body: '\u003ch1\u003e抱歉,未找到该产品。\u003c/h1\u003e',\n }),\n },\n // 问题:存在重定向链,/old-sale -\u003e /sale-2025 -\u003e /sale\n '/old-sale': { redirect: '/sale-2025' },\n '/sale-2025': { redirect: '/sale' },\n '/sale': {\n html: page({\n\n description: \"最高优惠40%购买上季跑步鞋,截止8月31日。\",\n canonical: '/sale',\n body: '\u003ch1\u003e夏季促销\u003c/h1\u003e',\n }),\n },\n // 问题:页面本身无法看到的noindex头部\n '/about': {\n headers: { 'X-Robots-Tag': 'noindex' },\n html: page({\n\n description: '了解这个两人工作室如何发展成为跑步鞋品牌。',\n canonical: '/about',\n body: '\u003ch1\u003e关于我们\u003c/h1\u003e',\n }),\n },\n // 问题:规范URL标签指向首页\n '/blog/choosing-trail-shoes': {\n html: page({\n\n description: '抓地力、落差和贴合度:选择山地跑步鞋时需要关注的关键要素。',\n canonical: '/',\n body: '\u003ch1\u003e如何选择山地跑步鞋\u003c/h1\u003e',\n }),\n },\n // 问题:内容需要JavaScript执行后才会加载\n '/catalog': {\n html: page({\n\n description: '浏览所有Acme跑步鞋产品。',\n canonical: '/catalog',\n body: '\u003cdiv id=\"app\"\u003e加载中...\u003c/div\u003e',\n script:\n \"fetch('/api/products').then((r) =\u003e r.json()).then((products) =\u003e {\" +\n \"document.getElementById('app').innerHTML = products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('');\" +\n '});',\n }),\n },\n '/api/products': {\n type: 'application/json',\n html: JSON.stringify(['Blue Runner', 'Trail Grip 2', 'City Glide']),\n },\n // 问题:robots.txt中的\"Disallow: /blog\"会阻止所有以/blog开头的路径\n '/robots.txt': {\n type: 'text/plain',\n html: 'User-agent: *\\nDisallow: /blog\\n',\n },\n};\n\nhttp\n .createServer((req, res) =\u003e {\n const path = new URL(req.url, BASE).pathname;\n const route = routes[path];\n\n if (!route) {\n res.writeHead(404, { 'Content-Type': 'text/html; charset=utf-8' });\n return res.end(page({ title: '页面未找到', body: '\u003ch1\u003e页面未找到\u003c/h1\u003e' }));\n }\n if (route.redirect) {\n res.writeHead(301, { Location: route.redirect });\n return res.end();\n }\n res.writeHead(200, {\n 'Content-Type': (route.type || 'text/html') + '; charset=utf-8',\n ...route.headers,\n });\n res.end(route.html);\n })\n .listen(PORT, () =\u003e console.log('练习站点运行在 ' + BASE));"])</script><script>self.__next_f.push([1,"ff:Tc07,"])</script><script>self.__next_f.push([1,"const routes = {\n '/': {\n html: page({\n\n description: '适用于道路和山径的轻便跑步鞋,提供免费退换货服务。',\n canonical: '/',\n body: [\n '\u003ch1\u003eAcme Shoes\u003c/h1\u003e',\n '\u003ca href=\"/products/blue-runner\"\u003eBlue Runner\u003c/a\u003e',\n '\u003cspan onclick=\"location.href=\\'/sale\\'\"\u003e夏季促销\u003c/span\u003e',\n ].join('\\n'),\n }),\n },\n // 问题:标题模糊且缺少元描述\n '/products/blue-runner': {\n html: page({\n\n canonical: '/products/blue-runner',\n body: '\u003ch1\u003eBlue Runner\u003c/h1\u003e',\n }),\n },\n // 问题:缺失的产品页面仍返回\"200 OK\"状态码(软404)\n '/products/red-runner': {\n html: page({\n\n body: '\u003ch1\u003e抱歉,未找到该产品。\u003c/h1\u003e',\n }),\n },\n // 问题:存在重定向链,/old-sale -\u003e /sale-2025 -\u003e /sale\n '/old-sale': { redirect: '/sale-2025' },\n '/sale-2025': { redirect: '/sale' },\n '/sale': {\n html: page({\n\n description: \"最高优惠40%购买上季跑步鞋,截止8月31日。\",\n canonical: '/sale',\n body: '\u003ch1\u003e夏季促销\u003c/h1\u003e',\n }),\n },\n // 问题:页面本身无法看到的noindex头部\n '/about': {\n headers: { 'X-Robots-Tag': 'noindex' },\n html: page({\n\n description: '了解这个两人工作室如何发展成为跑步鞋品牌。',\n canonical: '/about',\n body: '\u003ch1\u003e关于我们\u003c/h1\u003e',\n }),\n },\n // 问题:规范URL标签指向首页\n '/blog/choosing-trail-shoes': {\n html: page({\n\n description: '抓地力、落差和贴合度:选择山地跑步鞋时需要关注的关键要素。',\n canonical: '/',\n body: '\u003ch1\u003e如何选择山地跑步鞋\u003c/h1\u003e',\n }),\n },\n // 问题:内容需要JavaScript执行后才会加载\n '/catalog': {\n html: page({\n\n description: '浏览所有Acme跑步鞋产品。',\n canonical: '/catalog',\n body: '\u003cdiv id=\"app\"\u003e加载中...\u003c/div\u003e',\n script:\n \"fetch('/api/products').then((r) =\u003e r.json()).then((products) =\u003e {\" +\n \"document.getElementById('app').innerHTML = products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('');\" +\n '});',\n }),\n },\n '/api/products': {\n type: 'application/json',\n html: JSON.stringify(['Blue Runner', 'Trail Grip 2', 'City Glide']),\n },\n // 问题:robots.txt中的\"Disallow: /blog\"会阻止所有以/blog开头的路径\n '/robots.txt': {\n type: 'text/plain',\n html: 'User-agent: *\\nDisallow: /blog\\n',\n },\n};\n\nhttp\n .createServer((req, res) =\u003e {\n const path = new URL(req.url, BASE).pathname;\n const route = routes[path];\n\n if (!route) {\n res.writeHead(404, { 'Content-Type': 'text/html; charset=utf-8' });\n return res.end(page({ title: '页面未找到', body: '\u003ch1\u003e页面未找到\u003c/h1\u003e' }));\n }\n if (route.redirect) {\n res.writeHead(301, { Location: route.redirect });\n return res.end();\n }\n res.writeHead(200, {\n 'Content-Type': (route.type || 'text/html') + '; charset=utf-8',\n ...route.headers,\n });\n res.end(route.html);\n })\n .listen(PORT, () =\u003e console.log('练习站点运行在 ' + BASE));"])</script><script>self.__next_f.push([1,"4d:[\"$\",\"$Lfd\",\"code-257\",{\"code\":\"$fe\",\"lang\":\"javascript\",\"children\":\"$ff\"}]\n4e:[\"$\",\"p\",\"p-260\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"每个 \",[\"$\",\"code\",\"p-260-c-3\",{\"className\":\"rounded bg-slate-100 px-1.5 py-0.5 text-[14px] font-mono text-slate-800\",\"children\":\"routes\"}],\" 键对应一个页面地址。以 Problem: 开头的注释说明了每个页面存在的问题。\"]}]\n4f:[\"$\",\"p\",\"p-262\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"从同一文件夹启动服务器:\"]}]\n50:[\"$\",\"$Lfd\",\"code-265\",{\"code\":\"node server.js\",\"lang\":\"$undefined\",\"children\":\"node server.js\"}]\n51:[\"$\",\"p\",\"p-268\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"你应该看到:\"]}]\n52:[\"$\",\"$Lfd\",\"code-271\",{\"code\":\"Practice site running at http://localhost:8080\",\"lang\":\"$undefined\",\"children\":\"Practice site running at http://localhost:8080\"}]\n53:[\"$\",\"p\",\"p-274\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"保持服务器运行,然后打开第二个终端执行以下命令。当你修改 server.js 时,用 Ctrl+C 停止服务器并重新启动。\"]}]\n54:[\"$\",\"h3\",\"h2-275\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何检查页面的 HTTP 状态码\"}]\n55:[\"$\",\"p\",\"p-278\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"我记得刚开始构建网站时,做过各种各样的小项目。作为全栈开发者,我一直在尝试各种实验。\"]}]\n56:[\"$\",\"p\",\"p-280\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"有一次服务器端出现故障,我在 Network 标签页看到返回了 500 错误。另一次我故意删除了某个页面,想看看是否会触发 404 或其他问题。如果你在构建网站时多做尝试,会从结果中学到很多。\"]}]\n57:[\"$\",\"p\",\"p-282\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"HTTP 状态码是搜索引擎读取的第一项信息。它们是服务器与客户端(如你的浏览器)通信的方式。状态码分为五个区间:1xx、2xx、3xx、4xx 和 5xx。例如 5xx 状态码表示服务器问题,4xx 状态码表示客户端问题。\"]}]\n58:[\"$\",\"p\",\"p-284\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"404 是最常见的错误。它表示站点上找不到该页面。你经常会看到 404 错误,通常只需维护好网站和链接即可解决。\"]}]\n59:[\"$\",\"p\",\"p-286\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"本教程中你会看到以下状态码:\"]}]\n5a:[\"$\",\"ul\",\"ul-290\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"200 OK:页面已找到\"]}],[\"$\",\"li\",\"1\",{\"children\":[\"301 Moved Permanently:页面已永久迁移至新地址\"]}],[\"$\",\"li\",\"2\",{\"children\":[\"404 Not Found:此处无页面\"]}]]}]\n5b:[\"$\",\"p\",\"p-292\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"根据 Google 的 HTTP 状态码文档,Google 不会对返回 4xx 状态码的 URL 进行索引。\"]}]\n5c:[\"$\",\"p\",\"p-294\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"要查看练习网站首页的状态码,使用 -I 参数(仅显示头部信息)和 -s 参数(隐藏 curl 进度条):\"]}]\n5d:[\"$\",\"$Lfd\",\"code-297\",{\"code\":\"curl -sI http://localhost:8080/\",\"lang\":\"$undefined\",\"children\":\"curl -sI http://localhost:8080/\"}]\n5e:[\"$\",\"$Lfd\",\"code-305\",{\"code\":\"HTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\",\"lang\":\"$undefined\",\"children\":\"HTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\"}]\n5f:[\"$\",\"p\",\"p-308\",{\"className\":\"my-4 text-[17px] leading-8 tex"])</script><script>self.__next_f.push([1,"t-slate-800 break-words\",\"children\":[\"现在请求一个不在路由表中的地址,看看正确的 404 错误是什么样子:\"]}]\n60:[\"$\",\"$Lfd\",\"code-311\",{\"code\":\"curl -sI http://localhost:8080/products/does-not-exist\",\"lang\":\"$undefined\",\"children\":\"curl -sI http://localhost:8080/products/does-not-exist\"}]\n61:[\"$\",\"$Lfd\",\"code-319\",{\"code\":\"HTTP/1.1 404 Not Found\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\",\"lang\":\"$undefined\",\"children\":\"HTTP/1.1 404 Not Found\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\"}]\n62:[\"$\",\"p\",\"p-322\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在浏览器中打开开发者工具(F12 或 Mac 上的 Cmd+Option+I),进入 Network 标签页并刷新页面。状态列会显示状态码。\"]}]\n63:[\"$\",\"h4\",\"h3-323\",{\"className\":\"mt-6 mb-2 text-[17px] font-bold leading-tight text-slate-900 scroll-mt-24\",\"children\":\"什么是软 404?\"}]\n64:[\"$\",\"p\",\"p-326\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"检查一个商店已停止销售的商品:\"]}]\n65:[\"$\",\"$Lfd\",\"code-329\",{\"code\":\"curl -sI http://localhost:8080/products/red-runner\",\"lang\":\"$undefined\",\"children\":\"curl -sI http://localhost:8080/products/red-runner\"}]\n66:[\"$\",\"p\",\"p-332\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在浏览器中,同一页面会显示\\\"抱歉,未找到该商品\\\"。\"]}]\n67:[\"$\",\"p\",\"p-334\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"软 404 本质上是\\\"页面未找到\\\",但服务器仍返回 200 状态码。这会误导 Google,因为网址仍然存在,但内容已不再更新。\"]}]\n68:[\"$\",\"p\",\"p-336\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"要解决这个问题,应让缺失页面返回真正的 404 状态码,这正是 Google 推荐的做法。在练习网站中,从路由表中删除 '/products/red-runner' 条目。服务器随后会返回 404 状态码。\"]}]\n69:[\"$\",\"p\",\"p-338\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"破损链接会导致相同的结果。根据数据,被爬取的 53 个网站中有 18.9% 至少包含一个指向返回 404 的页面的链接。\"]}]\n6a:[\"$\",\"p\",\"p-340\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"因此不要留下指向不存在内容的链接。应将其更新为指向相似内容或确实存在的页面。\"]}]\n6b:[\"$\",\"p\",\"p-342\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"如果页面已迁移,应从旧地址添加 301 重定向到新地址。只有当页面确实不存在时,404 才是正确的响应。\"]}]\n6c:[\"$\",\"p\",\"p-344\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"重定向基本上是指当你希望将一个 URL(可能是一个已不存在的 URL)发送到另一个 URL(存在的 URL)时的操作。例如,如果你将域名从 example-x.com 更改为 example-y.com,你可能会设置重定向,让所有输入 example-x.com 的用户自动跳转到 example-y.com。\"]}]\n6d:[\"$\",\"p\",\"p-346\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"重定向本身是合理的,如果使用得当,它们可以非常有用。301 表示页面已永久移动,302 表示移动是临时的。Google 关于重定向的文档解释了它对每种状态的处理方式,其爬虫会跟踪最多 10 次重定向跳转。\"]}]\n6e:[\"$\",\"p\",\"p-348\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"但当旧地址(例如过去使用过的域名)重定向到新地址后,新地址又继续重定向,形成链式结构时,问题就出现了。少量重定向影响不大,但五次、六次甚至七次重定向则可能造成显著问题。\"]}]\n6f:[\"$\",\"p\",\"p-350\",{\"className\":\"m"])</script><script>self.__next_f.push([1,"y-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"下面的第一个命令会显示链中的每一步,第二个命令会给出一行摘要。\"]}]\n70:[\"$\",\"p\",\"p-352\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"添加 -L 参数让 curl 跟随重定向:\"]}]\n71:[\"$\",\"$Lfd\",\"code-355\",{\"code\":\"curl -sIL http://localhost:8080/old-sale\",\"lang\":\"$undefined\",\"children\":\"curl -sIL http://localhost:8080/old-sale\"}]\n72:[\"$\",\"$Lfd\",\"code-375\",{\"code\":\"HTTP/1.1 301 Moved Permanently\\nLocation: /sale-2025\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n\\nHTTP/1.1 301 Moved Permanently\\nLocation: /sale\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n\\nHTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\",\"lang\":\"$undefined\",\"children\":\"HTTP/1.1 301 Moved Permanently\\nLocation: /sale-2025\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n\\nHTTP/1.1 301 Moved Permanently\\nLocation: /sale\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\\n\\nHTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nDate: Sun, 25 Oct 2026 17:42:53 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\"}]\n73:[\"$\",\"p\",\"p-378\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"/old-sale 会跳转到 /sale-2025,再跳转到 /sale。要获取一行摘要:\"]}]\n74:[\"$\",\"$Lfd\",\"code-381\",{\"code\":\"curl -sL -o /dev/null -w \\\"%{num_redirects} redirects, ended at %{url_effective}\\\\n\\\" http://localhost:8080/old-sale\",\"lang\":\"$undefined\",\"children\":\"curl -sL -o /dev/null -w \\\"%{num_redirects} redirects, ended at %{url_effective}\\\\n\\\" http://localhost:8080/old-sale\"}]\n75:[\"$\",\"$Lfd\",\"code-385\",{\"code\":\"2 redirects, ended at http://localhost:8080/sale\",\"lang\":\"$undefined\",\"children\":\"2 redirects, ended at http://localhost:8080/sale\"}]\n76:[\"$\",\"p\",\"p-388\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"-o /dev/null 告诉 curl 将页面的 HTML 内容丢弃,避免填充终端,只输出摘要信息。-w 参数用于设置摘要内容的格式。\"]}]\n77:[\"$\",\"p\",\"p-390\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"要修复这个问题,应直接将旧地址指向最终页面:\"]}]\n78:[\"$\",\"$Lfd\",\"code-393\",{\"code\":\"'/old-sale': { redirect: '/sale' },\",\"lang\":\"$undefined\",\"children\":\"'/old-sale': { redirect: '/sale' },\"}]\n79:[\"$\",\"p\",\"p-396\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"重启服务器并再次运行摘要命令。现在显示为 1 次重定向,最终到达 http://localhost:8080/sale。\"]}]\n7a:[\"$\",\"h3\",\"h2-397\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何确保 robots.txt 没有阻止重要页面\"}]\n7b:[\"$\",\"p\",\"p-400\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"robots.txt 是网站告知搜索引擎(如 Google 及其爬虫)哪些内容可以访问、哪些不能访问的方式。\"]}]\n7c:[\"$\",\"p\",\"p-402\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"查看实践站点的文件:\"]}]\n7d:[\"$\",\"$Lfd\",\"code-405\",{\"code\":\"curl -s http://localhost:8080/robots.txt\",\"lang\":\"$undefined\",\"children\":\"curl -s http://localhost:8080/robots.txt\"}]\n7e:[\"$\",\"$Lfd\",\"code-410\",{\"code\":\"User-agent: *\\nDisallow: /blog\",\"lang\":\"$undefined\",\"children\":\"User-agent: *\\nDisallow: /blog\"}]\n7f:[\"$\",\"p\",\"p-413\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"Disallow: /blog 是危险的,因为它阻止爬虫访问所有以 /blog 开头的路径。而通常,你的文章内容是推动网站流量的主要因素。\"]}]\n80:[\"$\",\"p\",\"p-415\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"Google 的 robots.txt 文档提供了类似的示例:Disallow: /fi"])</script><script>self.__next_f.push([1,"sh 也会阻止 /fish.html 和 /fishheads。\"]}]\n81:[\"$\",\"p\",\"p-417\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"要修复这个问题,应仅阻止你本意要阻止的内容,例如草稿文件夹:\"]}]\n82:[\"$\",\"$Lfd\",\"code-421\",{\"code\":\"User-agent: *\\nDisallow: /blog-drafts/\",\"lang\":\"$undefined\",\"children\":\"User-agent: *\\nDisallow: /blog-drafts/\"}]\n83:[\"$\",\"p\",\"p-424\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在实践站点中,修改 '/robots.txt' 条目的 html 行:\"]}]\n84:[\"$\",\"$Lfd\",\"code-427\",{\"code\":\"html: 'User-agent: *\\\\nDisallow: /blog-drafts/\\\\n',\",\"lang\":\"$undefined\",\"children\":\"html: 'User-agent: *\\\\nDisallow: /blog-drafts/\\\\n',\"}]\n85:[\"$\",\"p\",\"p-430\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"robots.txt 控制的是爬虫抓取行为,而非索引。Google 表示这不是阻止页面出现在 Google 中的机制。若要实现此目的,需要使用 noindex。\"]}]\n86:[\"$\",\"p\",\"p-432\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"即使某个 URL 被 robots.txt 阻止,它仍可能出现在搜索结果中(通常没有描述),如果其他页面链接到它。Google 只是永远不会读取该页面的内容。\"]}]\n87:[\"$\",\"h3\",\"h2-433\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何发现意外的 noindex\"}]\n88:[\"$\",\"p\",\"p-436\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"noindex 告诉 Google 不要索引特定页面。当它出现在您希望被索引和排名的页面(如产品页面或首页)时会产生负面影响。\"]}]\n89:[\"$\",\"p\",\"p-438\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"但在您不希望被排名的页面,或对网站贡献较小的页面(如登录、注册页面)上,它可以发挥积极作用。\"]}]\n8a:[\"$\",\"p\",\"p-440\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"只有当爬虫能够访问页面并读取规则时,noindex 才会生效。如果 robots.txt 阻止了相同 URL,Google 将永远看不到 noindex,页面仍可能出现在搜索结果中。因此,若希望某页面不在 Google 中显示,请使用 noindex 并确保页面可被爬虫访问。\"]}]\n8b:[\"$\",\"p\",\"p-442\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在数据中,457 个审计页面中有 11 个(2.4%)包含 noindex robots 元标签。设置该标签有两种方式,需要检查两者。\"]}]\n8c:[\"$\",\"h4\",\"h3-443\",{\"className\":\"mt-6 mb-2 text-[17px] font-bold leading-tight text-slate-900 scroll-mt-24\",\"children\":\"如何检查 Robots 元标签\"}]\n8d:[\"$\",\"p\",\"p-446\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"第一种方式是页面 \u003chead\u003e 中的标签:\"]}]\n8e:[\"$\",\"$Lfd\",\"code-449\",{\"code\":\"\u003cmeta name=\\\"robots\\\" content=\\\"noindex\\\"\u003e\",\"lang\":\"$undefined\",\"children\":\"\u003cmeta name=\\\"robots\\\" content=\\\"noindex\\\"\u003e\"}]\n8f:[\"$\",\"p\",\"p-452\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在页面中搜索该词:\"]}]\n90:[\"$\",\"$Lfd\",\"code-455\",{\"code\":\"curl -s http://localhost:8080/about | grep -i noindex\",\"lang\":\"$undefined\",\"children\":\"curl -s http://localhost:8080/about | grep -i noindex\"}]\n91:[\"$\",\"p\",\"p-458\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在关于页面中,这会输出空内容。您也可以右键点击页面,选择“查看页面源代码”,然后搜索 noindex。\"]}]\n92:[\"$\",\"p\",\"p-460\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"修复 noindex 非常简单。您只需将其删除,搜索引擎即可索引页面。\"]}]\n93:[\"$\",\"p\",\"p-462\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在页面代码或模板中查找该标签,并检查 CMS 或 SEO 插件设置。在 WordPress 中,“Discourage search engines from"])</script><script>self.__next_f.push([1," indexing this site” 设置会将该标签添加到每个页面。\"]}]\n94:[\"$\",\"h4\",\"h3-463\",{\"className\":\"mt-6 mb-2 text-[17px] font-bold leading-tight text-slate-900 scroll-mt-24\",\"children\":\"如何检查 X-Robots-Tag 请求头\"}]\n95:[\"$\",\"p\",\"p-466\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"第二种方式是 HTTP 请求头。检查关于页面的请求头:\"]}]\n96:[\"$\",\"$Lfd\",\"code-469\",{\"code\":\"curl -sI http://localhost:8080/about\",\"lang\":\"$undefined\",\"children\":\"curl -sI http://localhost:8080/about\"}]\n97:[\"$\",\"$Lfd\",\"code-478\",{\"code\":\"HTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nX-Robots-Tag: noindex\\nDate: Sun, 25 Oct 2026 17:42:59 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\",\"lang\":\"$undefined\",\"children\":\"HTTP/1.1 200 OK\\nContent-Type: text/html; charset=utf-8\\nX-Robots-Tag: noindex\\nDate: Sun, 25 Oct 2026 17:42:59 GMT\\nConnection: keep-alive\\nKeep-Alive: timeout=5\"}]\n98:[\"$\",\"p\",\"p-481\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"该请求头不会出现在“查看页面源代码”中,只会出现在响应头中。在数据中,12 个被阻止页面中有 5 个 HTML 中没有 noindex:其中 2 个有此请求头,3 个被 robots.txt 阻止爬取。\"]}]\n99:[\"$\",\"p\",\"p-483\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在实践站点中修复此问题,需从 '/about' 条目中删除请求头行。在真实站点中,需检查服务器配置、托管提供商的请求头设置以及任何 SEO 插件。\"]}]\n9a:[\"$\",\"h3\",\"h2-484\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何正确使用规范标签\"}]\n9b:[\"$\",\"p\",\"p-487\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"如果您有多个页面讨论大致相同的内容,但内容不足以形成差异,您需要指定一个主页面。规范标签会告诉搜索引擎哪个页面是主页面。\"]}]\n9c:[\"$\",\"p\",\"p-489\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"同一页面可能有多个地址:\"]}]\n9d:[\"$\",\"$Lfd\",\"code-494\",{\"code\":\"https://example.com/blog/choosing-trail-shoes\\nhttps://example.com/blog/choosing-trail-shoes?utm_source=newsletter\\nhttps://www.example.com/blog/choosing-trail-shoes\",\"lang\":\"$undefined\",\"children\":\"https://example.com/blog/choosing-trail-shoes\\nhttps://example.com/blog/choosing-trail-shoes?utm_source=newsletter\\nhttps://www.example.com/blog/choosing-trail-shoes\"}]\n9e:[\"$\",\"p\",\"p-497\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"这三个地址显示的是同一篇文章。第一个是主地址:您希望 Google 在搜索结果中显示的地址。因此,所有三个地址都包含相同的规范标签,指向该主页面:\"]}]\n9f:[\"$\",\"$Lfd\",\"code-500\",{\"code\":\"\u003clink rel=\\\"canonical\\\" href=\\\"https://example.com/blog/choosing-trail-shoes\\\"\u003e\",\"lang\":\"$undefined\",\"children\":\"\u003clink rel=\\\"canonical\\\" href=\\\"https://example.com/blog/choosing-trail-shoes\\\"\u003e\"}]\na0:[\"$\",\"p\",\"p-503\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"当 Google 在 ?utm_source=newsletter 版本上看到此标签时,它会知道该页面是第一个地址的副本。主地址携带相同的标签,指向自身。这称为自引用规范标签,表示:“我是主版本”。\"]}]\na1:[\"$\",\"p\",\"p-505\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"Google 将其视为一个强烈信号,而非强制命令。如果您使用规范标签,每个主页面使用自引用规范标签是一种良好实践,Google 也推荐这样做。\"]}]\na2:[\"$\",\"p\",\"p-507\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"但你根本不需要使用规范标签。Google 表示指定规范标签并不是强制要求:如果没有规范标签,Google 会自行选择它认为最适合展示给用户的版本。当同一内容或非常相似的内容可以通过多"])</script><script>self.__next_f.push([1,"个 URL 访问时(例如上面的三个地址),规范标签是一个不错的选择。\"]}]\na3:[\"$\",\"p\",\"p-509\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"这就是为什么缺少规范标签本身并不构成缺陷。在数据中,457 个被审计页面中有 27.1% 没有规范标签。真正重要的是这些页面是否存在重复内容,例如带有跟踪参数的版本,这些内容可能需要规范标签。\"]}]\na4:[\"$\",\"p\",\"p-511\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"查看实践网站的徒步鞋文章:\"]}]\na5:[\"$\",\"$Lfd\",\"code-514\",{\"code\":\"curl -s http://localhost:8080/blog/choosing-trail-shoes | grep -i canonical\",\"lang\":\"$undefined\",\"children\":\"curl -s http://localhost:8080/blog/choosing-trail-shoes | grep -i canonical\"}]\na6:[\"$\",\"$Lfd\",\"code-518\",{\"code\":\"\u003clink rel=\\\"canonical\\\" href=\\\"http://localhost:8080/\\\"\u003e\",\"lang\":\"$undefined\",\"children\":\"\u003clink rel=\\\"canonical\\\" href=\\\"http://localhost:8080/\\\"\u003e\"}]\na7:[\"$\",\"p\",\"p-521\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"该文章将主页设为主版本,因此 Google 可能选择展示主页而非该文章,或忽略该标签。\"]}]\na8:[\"$\",\"p\",\"p-523\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"该文章内容是原创的,因此它本身应作为主版本。要修复这个问题,请将文章的规范标签指向文章本身:\"]}]\na9:[\"$\",\"$Lfd\",\"code-526\",{\"code\":\"canonical: '/blog/choosing-trail-shoes',\",\"lang\":\"$undefined\",\"children\":\"canonical: '/blog/choosing-trail-shoes',\"}]\naa:[\"$\",\"h3\",\"h2-528\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何修复缺失或重复的标题和元描述\"}]\nab:[\"$\",\"p\",\"p-531\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"优秀的标题或元描述应长度适中、不过载,并能简洁地说明页面内容。它某种程度上是页面的核心,就像页面的简介。\"]}]\nac:[\"$\",\"p\",\"p-533\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"查看 Blue Runner 产品页面:\"]}]\nad:[\"$\",\"$Lfd\",\"code-536\",{\"code\":\"curl -s http://localhost:8080/products/blue-runner | grep -i -E \\\"\u003ctitle\u003e|name=\\\\\\\"description\\\\\\\"\\\"\",\"lang\":\"$undefined\",\"children\":\"curl -s http://localhost:8080/products/blue-runner | grep -i -E \\\"\u003ctitle\u003e|name=\\\\\\\"description\\\\\\\"\\\"\"}]\nae:[\"$\",\"$Lfd\",\"code-540\",{\"code\":\"\u003ctitle\u003eAcme Shoes\u003c/title\u003e\",\"lang\":\"$undefined\",\"children\":\"\u003ctitle\u003eAcme Shoes\u003c/title\u003e\"}]\naf:[\"$\",\"p\",\"p-543\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"该标题对页面内容没有任何说明,且完全没有描述信息。在 PowerShell 中,可以使用 | Select-String '\u003ctitle\u003e|name=\\\"description\\\"' 来查找此类问题。\"]}]\nb0:[\"$\",\"p\",\"p-545\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"Google 关于标题和摘要的指南要求每一页都应有独特且具有描述性的标题和描述。\"]}]\nb1:[\"$\",\"p\",\"p-547\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在实践网站中修复此问题,将 '/products/blue-runner' 条目中的标题行替换为:\"]}]\nb2:[\"$\",\"$Lfd\",\"code-551\",{\"code\":\"\\ndescription: 'A lightweight road running shoe with a cushioned sole and free returns.',\",\"lang\":\"$undefined\",\"children\":\"\\ndescription: 'A lightweight road running shoe with a cushioned sole and free returns.',\"}]\nb3:[\"$\",\"h3\",\"h2-553\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何使链接可爬取\"}]\nb4:[\"$\",\"p\",\"p-556\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"查看实践网站的主页:\"]}]\nb5:[\"$\",\"$Lfd\",\"code-559\",{\"code\":\"curl -s http://localhost:8080/\",\"lang\":\"$undefined\",\"children\":\"curl -s http://localhost:8080/\"}]\nb6:[\"$\",\"$Lfd\",\"code-576\",{\"code\":\"\u003c!doctype html\u003e\\n\u003chtml lang=\\\"en\\\"\u003e\\n\u003chead\u003e\\n\u003cmeta charset=\\\"utf-8\\\""])</script><script>self.__next_f.push([1,"\u003e\\n\u003ctitle\u003eAcme Shoes: Running Shoes for Every Runner\u003c/title\u003e\\n\u003cmeta name=\\\"description\\\" content=\\\"Lightweight running shoes for road and trail, with free returns.\\\"\u003e\\n\u003clink rel=\\\"canonical\\\" href=\\\"http://localhost:8080/\\\"\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n\u003ch1\u003eAcme Shoes\u003c/h1\u003e\\n\u003ca href=\\\"/products/blue-runner\\\"\u003eBlue Runner\u003c/a\u003e\\n\u003cspan onclick=\\\"location.href='/sale'\\\"\u003eSummer sale\u003c/span\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\",\"lang\":\"$undefined\",\"children\":\"\u003c!doctype html\u003e\\n\u003chtml lang=\\\"en\\\"\u003e\\n\u003chead\u003e\\n\u003cmeta charset=\\\"utf-8\\\"\u003e\\n\u003ctitle\u003eAcme Shoes: Running Shoes for Every Runner\u003c/title\u003e\\n\u003cmeta name=\\\"description\\\" content=\\\"Lightweight running shoes for road and trail, with free returns.\\\"\u003e\\n\u003clink rel=\\\"canonical\\\" href=\\\"http://localhost:8080/\\\"\u003e\\n\u003c/head\u003e\\n\u003cbody\u003e\\n\u003ch1\u003eAcme Shoes\u003c/h1\u003e\\n\u003ca href=\\\"/products/blue-runner\\\"\u003eBlue Runner\u003c/a\u003e\\n\u003cspan onclick=\\\"location.href='/sale'\\\"\u003eSummer sale\u003c/span\u003e\\n\u003c/body\u003e\\n\u003c/html\u003e\"}]\nb7:[\"$\",\"p\",\"p-579\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"该页面的其他内容都很好:标题、描述、规范标签以及 Blue Runner 链接(这是一个带有 href 的真实 \u003ca\u003e 元素)。唯一的问题是 \\\"Summer sale\\\" 这个 \u003cspan\u003e 元素。\"]}]\nb8:[\"$\",\"p\",\"p-581\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"\u003cspan\u003e 基本上是非语义化的 HTML 元素,意味着它没有实际意义。真正的链接确实有含义:搜索引擎可以理解这是一个链接,屏幕阅读器也能识别这是一个链接。\"]}]\nb9:[\"$\",\"p\",\"p-583\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"哪些链接需要可爬取?基本上是你希望搜索引擎看到的一切。我的意思是你要销售的产品、你的文章、你的课程以及其他类似的内容。\"]}]\nba:[\"$\",\"p\",\"p-585\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"Google 的链接指南指出,它只能可靠地爬取带有 href 属性的 \u003ca\u003e 元素。\"]}]\nbb:[\"$\",\"p\",\"p-587\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在实践网站中修复此问题,将 \u003cspan\u003e 行替换为:\"]}]\nbc:[\"$\",\"$Lfd\",\"code-590\",{\"code\":\"'\u003ca href=\\\"/sale\\\"\u003eSummer sale\u003c/a\u003e',\",\"lang\":\"$undefined\",\"children\":\"'\u003ca href=\\\"/sale\\\"\u003eSummer sale\u003c/a\u003e',\"}]\nbd:[\"$\",\"h3\",\"h2-592\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"如何检查内容是否需要 JavaScript 才能显示\"}]\nbe:[\"$\",\"p\",\"p-595\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在客户端渲染中,JavaScript 必须首先加载,之后其他内容才能加载。\"]}]\nbf:[\"$\",\"p\",\"p-597\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"JavaScript 通常用于构建产品列表、价格、评论和菜单等内容。没有它时,客户端页面通常只会显示加载信息或空白框。\"]}]\nc0:[\"$\",\"p\",\"p-599\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"谷歌确实会渲染 JavaScript,但会在稍后的阶段进行。页面会进入渲染队列,可能需要几秒甚至更长时间,而脚本如果失败或被阻塞,可能导致渲染后的页面缺少内容。\"]}]\nc1:[\"$\",\"p\",\"p-601\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"这就是为什么服务器端渲染仍然是一个好主意,也是我更倾向于用于重要内容的方式。谷歌的 JavaScript 指南也持相同观点:服务器端渲染能为用户和爬虫提供更快的网站体验,并非所有爬虫都能运行 JavaScript。\"]}]\nc2:[\"$\",\"p\",\"p-603\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"数据显示,在 277 个被审核的页面中,17.7% 的页面主要由 JavaScript 构建。这并不意味着谷歌无法抓取这些页面,只是说明它们的主要内容依赖于 JavaScript 正确运行。\"]}]\nc3:[\"$\",\"p\",\"p-605\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"通过服务器端"])</script><script>self.__next_f.push([1,"渲染,HTML 内容会直接发送到浏览器,之后才会执行 JavaScript 渲染。\"]}]\nc4:[\"$\",\"p\",\"p-607\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"谷歌可以抓取通过这两种方式构建的页面。其爬虫使用最新版 Chrome 运行 JavaScript,因此服务器端渲染并不是进入谷歌索引的必要条件。\"]}]\nc5:[\"$\",\"p\",\"p-609\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"下一个测试检查重要内容是否在没有 JavaScript 的情况下可见。它不会显示谷歌看到的内容(因为谷歌会运行 JavaScript),但会显示所有爬虫在 JavaScript 执行前看到的内容。\"]}]\nc6:[\"$\",\"p\",\"p-611\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在浏览器中打开 http://localhost:8080/catalog。你会看到三个产品。现在使用不运行 JavaScript 的 curl 下载页面:\"]}]\nc7:[\"$\",\"$Lfd\",\"code-614\",{\"code\":\"curl -s http://localhost:8080/catalog | grep -i \\\"trail grip\\\"\",\"lang\":\"$undefined\",\"children\":\"curl -s http://localhost:8080/catalog | grep -i \\\"trail grip\\\"\"}]\nc8:[\"$\",\"p\",\"p-617\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"这不会输出任何内容,因为产品名称不在服务器发送的 HTML 中。在 \",[\"$\",\"code\",\"p-617-c-34\",{\"className\":\"rounded bg-slate-100 px-1.5 py-0.5 text-[14px] font-mono text-slate-800\",\"children\":\"\u003cbody\u003e\"}],\" 中,服务器只发送:\"]}]\nc9:[\"$\",\"$Lfd\",\"code-621\",{\"code\":\"\u003cdiv id=\\\"app\\\"\u003eLoading...\u003c/div\u003e\\n\u003cscript\u003efetch('/api/products').then((r) =\u003e r.json()).then((products) =\u003e {document.getElementById('app').innerHTML = products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('');});\u003c/script\u003e\",\"lang\":\"$undefined\",\"children\":\"\u003cdiv id=\\\"app\\\"\u003eLoading...\u003c/div\u003e\\n\u003cscript\u003efetch('/api/products').then((r) =\u003e r.json()).then((products) =\u003e {document.getElementById('app').innerHTML = products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('');});\u003c/script\u003e\"}]\nca:[\"$\",\"p\",\"p-624\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"如果不使用 curl,可以在浏览器中使用“查看页面源代码”功能。在这个页面上,你会看到 \\\"Loading...\\\" 和脚本,但看不到产品名称,因为浏览器只有在 JavaScript 执行后才会添加它们。\"]}]\ncb:[\"$\",\"p\",\"p-626\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在你自己的网站上,搜索页面源代码中的一句重要内容。\"]}]\ncc:[\"$\",\"p\",\"p-628\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"要查看谷歌渲染页面的方式,可以使用谷歌自己的工具对实时页面进行测试。在你自己的网站上,搜索控制台中的 URL 检查工具(Test live URL,然后 View tested page)可以运行实时测试,并显示谷歌渲染的 HTML 和截图。\"]}]\ncd:[\"$\",\"p\",\"p-630\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"对于任何公开页面,丰富结果测试(Rich Results Test)也会显示渲染后的 HTML。谷歌推荐两者都用于查找 JavaScript 问题。两者都无法访问 localhost,因此请在你的真实网站上尝试。\"]}]\nce:[\"$\",\"p\",\"p-632\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"如果你想从一开始就在 HTML 中显示产品名称,请在服务器端渲染它们。在示例网站中,将产品列表添加到路由上方:\"]}]\ncf:[\"$\",\"$Lfd\",\"code-635\",{\"code\":\"const products = ['Blue Runner', 'Trail Grip 2', 'City Glide'];\",\"lang\":\"$undefined\",\"children\":\"const products = ['Blue Runner', 'Trail Grip 2', 'City Glide'];\"}]\nd0:[\"$\",\"p\",\"p-638\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"将 catalog 的 body 和 script 行替换为:\"]}]\nd1:[\"$\",\"$Lfd\",\"code-641\",{\"code\":\"body: '\u003cdiv id=\\\"app\\\"\u003e' + products.map((p) =\u003e '\u003ch2\u003e' + p + '\u003c/h2\u003e').join('') + '\u003c/div\u003e',\",\"lang\":\"$undefined\",\"children\":\"body: '\u003cdiv id=\\\"app\\\"\u003e' + products.map((p) =\u003e '\u003ch2\u003e' + p + "])</script><script>self.__next_f.push([1,"'\u003c/h2\u003e').join('') + '\u003c/div\u003e',\"}]\nd2:[\"$\",\"p\",\"p-644\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"并在 '/api/products' 入口处:\"]}]\nd3:[\"$\",\"$Lfd\",\"code-647\",{\"code\":\"html: JSON.stringify(products),\",\"lang\":\"$undefined\",\"children\":\"html: JSON.stringify(products),\"}]\nd4:[\"$\",\"p\",\"p-650\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"重启服务器并再次运行 curl 命令:\"]}]\nd5:[\"$\",\"$Lfd\",\"code-653\",{\"code\":\"\u003cdiv id=\\\"app\\\"\u003e\u003ch2\u003eBlue Runner\u003c/h2\u003e\u003ch2\u003eTrail Grip 2\u003c/h2\u003e\u003ch2\u003eCity Glide\u003c/h2\u003e\u003c/div\u003e\",\"lang\":\"$undefined\",\"children\":\"\u003cdiv id=\\\"app\\\"\u003e\u003ch2\u003eBlue Runner\u003c/h2\u003e\u003ch2\u003eTrail Grip 2\u003c/h2\u003e\u003ch2\u003eCity Glide\u003c/h2\u003e\u003c/div\u003e\"}]\nd6:[\"$\",\"p\",\"p-656\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"这之所以有效,是因为服务器现在在发送页面前就将产品名称写入 HTML。任何爬虫都能看到这些内容,即使它们无法运行 JavaScript,你仍然可以使用 JavaScript 实现交互功能。\"]}]\nd7:[\"$\",\"h3\",\"h2-657\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"五分钟内能检查页面吗?\"}]\nd8:[\"$\",\"p\",\"p-660\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"说实话,这非常困难。可能会出现很多问题,五分钟的时间远远不够。\"]}]\nd9:[\"$\",\"p\",\"p-662\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"要真正了解具体存在哪些问题,你需要运行完整的检查,例如在Google PageSpeed Insights中进行检查。如果网站属于你本人,还可以使用Google Search Console中的URL检查工具。\"]}]\nda:[\"$\",\"p\",\"p-664\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"本教程中的命令是一个不错的起点:\"]}]\ndb:[\"$\",\"ul\",\"ul-666\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"使用curl -sI检查状态码和X-Robots-Tag头信息。\"]}]]}]\ndc:[\"$\",\"ul\",\"ul-668\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"使用curl -sIL检查旧地址以统计重定向次数。\"]}]]}]\ndd:[\"$\",\"ul\",\"ul-670\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"逐行查看/robots.txt文件。\"]}]]}]\nde:[\"$\",\"ul\",\"ul-672\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"在页面源代码中检查noindex标签、canonical标签、\u003ctitle\u003e标签、描述信息和重要内容。\"]}]]}]\ndf:[\"$\",\"h3\",\"h2-673\",{\"className\":\"mt-8 mb-2 text-[20px] font-bold leading-tight text-slate-950 scroll-mt-24\",\"children\":\"结论\"}]\ne0:[\"$\",\"p\",\"p-676\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"在本教程中,你修复了实践网站上的八个问题:软404错误、重定向链、robots.txt规则、隐藏的noindex头信息、错误的canonical标签、模糊的标题和缺失的描述、爬虫无法追踪的链接,以及需要JavaScript才能访问的内容。\"]}]\ne1:[\"$\",\"p\",\"p-678\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"最重要的是,你需要持续检查网站。定期运行扫描,进行维护,确保网站功能正常,尤其是在对网站进行优化或更改时。\"]}]\ne2:[\"$\",\"p\",\"p-680\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"如果你想更进一步,我关于在Next.js网站中添加结构化数据(JSON-LD)的教程是一个不错的下一步选择。\"]}]\ne3:[\"$\",\"p\",\"p-682\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"如果你想一次性检查实时页面的多个问题,我的免费工具Greadme Page Audit可以无需注册直接测试任何URL。\"]}]\ne"])</script><script>self.__next_f.push([1,"4:[\"$\",\"p\",\"p-684\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"推荐课程(合作伙伴推荐,1/5)\"]}]\ne5:[\"$\",\"p\",\"p-686\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"(在新标签页中打开)\"]}]\ne6:[\"$\",\"p\",\"p-688\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"广告\"]}]\ne7:[\"$\",\"ul\",\"ul-690\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Coursera 2026 Google Search Console:#1 SEO工具用于跟踪SEO Alex Genadinik 2小时 初学者 证书 查看课程(在新标签页中打开)\"]}]]}]\ne8:[\"$\",\"ul\",\"ul-692\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Udemy SEO 2027:如何在Google上排名第一 - 最终SEO课程 iMarket XL和Matt Jensen 4.3(1,883) 4小时48分钟 初学者 证书 查看课程(在新标签页中打开)\"]}]]}]\ne9:[\"$\",\"ul\",\"ul-694\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Udemy SEO:亚马逊联盟营销+SEO |250+视频 |18.0小时 The SEO Academy SEO教育领导者 4.5(3,420) 20小时6分钟 初学者 证书 查看课程(在新标签页中打开)\"]}]]}]\nea:[\"$\",\"ul\",\"ul-696\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Skillshare SEO 2024:SEO入门 Arkadiusz Włodarczyk 4.3(10) 2小时54分钟 初学者 查看课程(在新标签页中打开)\"]}]]}]\neb:[\"$\",\"p\",\"p-698\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"更多SEO课程请查看Class Central\"]}]\nec:[\"$\",\"p\",\"p-700\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"→\"]}]\ned:[\"$\",\"p\",\"p-702\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"推荐课程(合作伙伴推荐,2/5)\"]}]\nee:[\"$\",\"ul\",\"ul-704\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Udemy 从零开始学习高级SEO,完整SEO培训课程 Debajyoti Banerjee 4.2(1,772) 10小时51分钟 初学者 查看课程(在新标签页中打开)\"]}]]}]\nef:[\"$\",\"ul\",\"ul-706\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Skillshare SEO审计 - 学习如何发现和修复网站上最常见的SEO问题 Joshua George 4.6(54) 1小时58分钟 初学者 查看课程(在新标签页中打开)\"]}]]}]\nf0:[\"$\",\"ul\",\"ul-708\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Skillshare SEO Google:SEO基础:WordPress SEO入门 Jim Bruce 4.4(26) 1小时26分钟 初学者 查看课程(在新标签页中打开)\"]}]]}]\nf1:[\"$\",\"ul\",\"ul-710\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Udemy SEO入门教程 Daragh Walsh 4.5(33,729) 45分钟 初学者 查看课程(在新标签页中打开)\"]}]]}]\nf2:[\"$\",\"p\",\"p-712\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"推荐课程(合作伙伴推荐,3/5)\"]}]\nf3:[\"$\",\"ul\",\"ul-714\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Coursera 使用HTML \u0026 CSS创建多页应用 Omnya Khaled 4.2(14) 1小时55分钟 初学者 证书 查看课程(在新标签页中打开)\"]}]]}]\nf4:[\"$\",\"ul\",\"ul-716\",{\"className\":\"my-4 list-disc space-y-2.5 pl-6 text-[17px] leading-8 text-slate-800 marker:text-slate-400\",\"children\":[[\"$\",\"li\",\"0\",{\"children\":[\"Course"])</script><script>self.__next_f.push([1,"ra 搜索引擎优化课程 LearnKartS和Tanmoy Kumar Das 6周,每周3小时 初学者 证书 查看课程(在新标签页中打开)\"]}]]}]\nf5:[\"$\",\"p\",\"p-718\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"合作伙伴推荐课程(侧边栏,第4部分共5部分)\"]}]\nf6:[\"$\",\"p\",\"p-720\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"合作伙伴推荐课程(侧边栏,第5部分共5部分)\"]}]\nf7:[\"$\",\"p\",\"p-722\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"我是一名软件开发人员和SEO专家,热爱构建真正满足人们需求的产品。我喜欢将想法转化为实际产品,探索新技术并在过程中不断学习。我也热衷于与其他开发者分享所学知识。\"]}]\nf8:[\"$\",\"p\",\"p-724\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"如果你读到这里,请向作者表达感谢以示支持。说声谢谢\"]}]\nf9:[\"$\",\"p\",\"p-726\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"免费学习编程。freeCodeCamp的开源课程已帮助超过40,000人成为开发者。立即开始\"]}]\nfa:[\"$\",\"p\",\"p-728\",{\"className\":\"my-4 text-[17px] leading-8 text-slate-800 break-words\",\"children\":[\"合作伙伴推荐课程\"]}]\n"])</script></body></html>