大网数据广告活动
网站运营与故障问答

Should I exclude the assets folder from search engine crawlers in angular

· 52CE 我爱测

I'm working with angular and had added the assets folder as element to exclude from the search engine crawlers, into my robots.txt file. But I now get the following error while testing the site health of my website. 1 issue with …

问题原文

原帖链接 · Raphaël Balet · CC BY-SA 4.0

I'm working with angular and had added the assets folder as element to exclude from the search engine crawlers, into my robots.txt file.

But I now get the following error while testing the site health of my website. 1 issue with blocked internal resource in robots.txt

What should I do? Is it a good practice to remove such assets (I have a tons of images into it), or is it better to leave it like it.

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 4.0

It is usually a good idea to allow the entire assets folder to be crawled.

Images

If you don't allow your images to be crawled, they won't be indexed in image search. Disallow images from crawling only if you don't want them indexed. If you have multiple sizes of the same image you might want Google to index only the largest size because larger images rank better. You could disallow your small images such as thumbnails.

CSS, JS, and fonts

You want Googlebot to be able to crawl anything needed to render your pages. If Googlebot can't render your pages correctly, there is a risk that your site will not get fully indexed, indexed incorrectly, or that Google will think that they layout isn't usable.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2022-02-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。