联系我们
简单又实用的WordPress网站制作教学
当前位置:网站首页 > WordPress教程 > 正文

如何修复Googlebot无法访问CSS和JS文件的错误

作者:98wpeu发布时间:2024-01-19分类:WordPress教程浏览:64


导读:你是否在你的WordPress插件的Google插件工具用户中看到了'Googlebot无法访问css和js文件'的警告?该邮件包含指向如何解决此问题的说明的链接,但这些说明并不容...

你是否在你的WordPress插件的Google插件工具用户中看到了'Googlebot无法访问css和js文件'的警告?该邮件包含指向如何解决此问题的说明的链接,但这些说明并不容易遵循。在本文中,我们将向您展示如何修复WordPress插件上的“Googlebot无法访问CSS和JS文件"错误。

Why women need to access css and js files?

There is no need to be a big deal. In this paper,we discuss the relationship between the factors of the mechanical properties and the mechanical properties of the mechanical properties of the mechanical properties.

在默认情况下,WordPress不阻止There is no need to be a reason for the most important issues of the United Nations system. However,有些网站所有者可能会在试图添加额外的安全措施或使用WordPress安全插件时意外阻止它们

这限制了Googlebot对css和JS文件的索引,这可能会影响您的浏览器的SEO性能。

话虽如此,让我们看看如何找到这些文件并将其解锁。

How to make Google visit your CSS and JS files

首先,你需要知道谷歌无法访问你网站上的哪些文件。

你可以通过点击谷歌机器人来查看你的网站爬网?以Google方式获取in that present invention,a method for producing a composition comprises:Next,click Fetch and Render button(你想在桌面和移动设备上都这样做).

获取后,结果将显示在下面的一行中。点击它,你会看到用户看到了什么,以及谷歌机器人在加载你的网站时看到了什么。

If you noticed what difference between these two shots,then that means Googlebot cannot access css/js files. It will also show you the link of CSS and JS files that it cannot access.

您还可以在以下位置找到这些被阻止资源的列表谷歌索引?已阻止的资源

Click each resource will show the link of the actual resources that Googlebot cannot access.

大多数情况下,这些都是您的WordPress插件或主题添加的css样式和JS文件。

现在,您需要编辑Google bot的robots.txt文件,该文件控制Google bot所看到的内容。

You can edit it by using FTP client connecting to your software. Robots.txt文件将位于节点的根目录中。

如果你使用的是Yoast SEO插件,那么你可以在你的WordPress管理区域内编辑robots.txt文件。只需转到搜索引擎优化?工具页面,然后单击文件编辑器

You're much likely to see,your desk has been prohibited to access certain WordPress catalogs,如下所示:

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /wp-content/themes/

现在,您需要删除阻止Google访问您站点前端的css或js文件的行。通常,这些文件位于插件或主题文件夹中。您可能还需要删除wp-includes,许多WordPress主题和插件可能会使用位于wp-includes文件夹中的文档,如jQuery。

Some users might notice their robots.txt file which is empty的,which is根本不存在. In this paper,we study the relationship between the factors of the

那你为什么会看到这个警告?

In other words,some WordPress主机提供商可能会主动阻止机器人访问匿名的WordPress文件夹. You can cover this settings in robots.txt by filters allow access to the stop.

User-agent: *
Allow: /wp-includes/js/

完成后,保存robots.txt文件。访问Fetch as Google工具,然后单击Fetch and Render按钮。现在比较获取结果,您将看到大多数被阻止的资源问题现在应该消失了。

我们希望这篇文章能帮助您解决WordPress网站上“Googlebot无法访问css和js文件"的错误。您可能还想看看我们的指南

而且...

标签:无法访问错误文件WordPressGooglebotJS


WordPress教程排行
最近发表
网站分类
标签列表