[英]Google is indexing LESS.js files
For days, it has been a puzzle to me why my new site fails to rank on a very small niche. 几天来,为什么我的新网站无法在很小的细分市场上排名,这一直让我感到困惑。 I have been doing really well on SEO with all my previous sites except my personal site.
除了个人网站,我以前所有的网站在SEO上的表现都非常好。 The site is on http://www.jhourlad.com .
该网站位于http://www.jhourlad.com上 。 Just today, Google started displaying my site's keywords on Google Webmaster tools and I was shocked by the result.
就在今天,Google开始在Google网站站长工具上显示我网站的关键字,结果让我感到震惊。 The image below sums up what I am talking about:
下图总结了我在说什么:
As you can see, Google seems to be crawling my .less files and it is hurting my SEO result. 如您所见,Google似乎正在抓取我的.less文件,这正在损害我的SEO结果。 Is there a way that I can tell Google to treat .less files as CSS files and bypass it during indexing?
有没有一种方法可以告诉Google将.less文件视为CSS文件,并在建立索引期间将其绕过?
You need to use a robots.txt
file. 您需要使用
robots.txt
文件。
User-agent: *
Disallow: /*.less$
Disallow: /*.js$
Or, instead of disallowing extensions, you can place all your static content into a directory and disallow that so it's more managable. 或者,您可以将所有静态内容放到目录中并禁止它,而不是禁止扩展名,以便于管理。
User-agent: *
Disallow: /static/
You can use Google Webmaster Tools
to validate your robots.txt file. 您可以使用
Google Webmaster Tools
来验证robots.txt文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.