【问题标题】:Stylesheet Blocked by Google after Rendering渲染后被 Google 阻止的样式表
【发布时间】:2015-02-21 11:49:32
【问题描述】:

在 Google 搜索 Condole(以 Google 方式获取)中呈现我的网站时,我发现我网站的样式表被阻止了。提取状态显示“部分”。我怀疑这是我的网站没有出现在 Google 搜索结果中的原因。

但是,在将我的网站添加到 Bing 搜索引擎后,它会在一小时后出现在搜索结果中。因此,我的网站在 Bing 中没有任何索引问题。

如何允许 Googlebot 访问我网站的 CSS 文件?

我正在使用 Magento 网站。以下是 Search Console 中的获取详细信息:

http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/styles.css3.php?url=http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/bootstrap.css Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/bootstrap-theme.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/font-awesome.css  Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/font-awesome.min.css  Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/styles.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/base/default/css/widgets.css Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/fancybox/jquery.fancybox.css  Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/ajaxcartsuper/ajax_cart_super.css Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/categorytabsliders.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/custommenu.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/imagerotator/effect.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/layerednavigationajax/jquery-ui.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/ma.upsellslider.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/ma.verticalmenu.css   Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/ma.banner7.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/magentothem/css/ma.brandslider.css    Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/print.css Style Sheet Blocked robots.txt Tester
http://www.cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/images/logo.png   Image   Blocked robots.txt Tester

这是我的robots.txt

# Google Image Crawler Setup
User-agent: Googlebot-Image
Disallow:

# Crawlers Setup

# Directories
Disallow: /404/
Disallow: /app/
Disallow: /cgi-bin/
Disallow: /downloader/
Disallow: /errors/
Disallow: /includes/
#Disallow: /js/
#Disallow: /lib/
Disallow: /magento/
#Disallow: /media/
Disallow: /pkginfo/
Disallow: /report/
Disallow: /scripts/
Disallow: /shell/
Disallow: /skin/
Disallow: /stats/
Disallow: /var/

# Paths (clean URLs)
Disallow: /index.php/
Disallow: /catalog/product_compare/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/
Disallow: /catalogsearch/
#Disallow: /checkout/
Disallow: /control/
Disallow: /contacts/
Disallow: /customer/
Disallow: /customize/
Disallow: /newsletter/
Disallow: /poll/
Disallow: /review/
Disallow: /sendfriend/
Disallow: /tag/
Disallow: /wishlist/
Disallow: /catalog/product/gallery/

# Files
Disallow: /cron.php
Disallow: /cron.sh
Disallow: /error_log
Disallow: /install.php
Disallow: /LICENSE.html
Disallow: /LICENSE.txt
Disallow: /LICENSE_AFL.txt
Disallow: /STATUS.txt

# Paths (no clean URLs)
Disallow: /*.php$
Disallow: /*?SID=

【问题讨论】:

    标签: css magento stylesheet robots.txt


    【解决方案1】:

    您发布的robots.txt 似乎不是you're currently using。您当前的robots.txt 包含:

    User-agent: Googlebot
    Allow: /blocked-folder/css/
    Allow: /blocked-folder/java/
    
    ...
    
    Disallow: /skin/
    

    因此,您明确告诉 Googlebot 不要获取 /skin 目录中的文件。

    编辑:您还有以下规则

    Disallow: /*.php$
    

    禁止所有 PHP 文件。删除这些行,你会没事的。

    【讨论】:

    • 我将 /skin 目录更改为 Allow:/skin/ 并且渲染结果仍然不完整,但我在谷歌上发现了一个问题; cherryconcept.com/skin/frontend/default/ma_sahara_fashion5/css/…
    • 我删除了 php 行并编辑了一些 php 文件以允许,几乎完成了 complate 但仍然出现一个问题; syleesheet 无法访问 此外 robots.txt 发现一个警告 craw-delay:10
    • Google 不使用 crawl-delay 并将其报告为警告。大型搜索引擎也从 Google 那里获得了领导地位,并拥有一个网站管理员工具类型系统,您可以在其中塑造 24 小时内的抓取流量,而不仅仅是全面减慢抓取速度。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-09
    • 2018-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多