网站logo尺寸一般多大,漳州市芗城区建设局网站,巴音郭楞蒙古自治州建设局网站,软件开发工具03173为什么 Allow 配合 meta noindex
1、Disallow 的问题
当你使用 Disallow: / 时#xff1a; 爬虫根本不会访问你的页面 因此永远看不到你的 meta noindex 标签 如果有其他网站链接到你的页面#xff0c;Google 可能还是会将其编入索引#xff08;因为它无法确认你是否真的…为什么 Allow 配合 meta noindex
1、Disallow 的问题
当你使用 Disallow: / 时 爬虫根本不会访问你的页面 因此永远看不到你的 meta noindex 标签 如果有其他网站链接到你的页面Google 可能还是会将其编入索引因为它无法确认你是否真的不想被索引
robots.ts
// 这种方式不太理想
res.send(User-agent: *
Disallow: / # 爬虫被挡在门外看不到 meta 标签);2、Allow 的优势
当你使用 Allow: / 时 爬虫可以访问你的页面 可以看到并理解meta noindex 标签 Google 会明确知道你不想被索引而不是猜测 更容易从搜索结果中移除已经被索引的页面
// 这是推荐的方式
res.send(User-agent: *
Allow: / # 让爬虫进来这样它能看到 meta noindex);比喻说明
可以把这个过程想象成 Disallow 就像关上门不让客人进来 Allow meta noindex 就像让客人进来但明确告诉他们请不要在外面宣传这个地方
第二种方式更礼貌也更明确搜索引擎更可能遵守你的请求。这就是为什么 Allow 配合 meta noindex 的效果反而更好