Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1418633

    I am getting 19 of these broken css link warnings for blog posts. Not sure what this is or why it is showing up. Is this an Enfold thing? Putting a link to a screenshot below:

    https://drive.google.com/file/d/1Mkj2B-9SdEmZ1DKojbCJgumckRFRfDOA/view?usp=sharing

    #1418689

    Hey gatehealing,
    These are links to old css files from your site, typically bots don’t follow these.
    To correct create a robot.txt file in the root directly of your site and add this exclusion so the bots won’t follow, it may that some time to the bots to find your robot.txt unless you add it to your Google Search Console

    User-agent: *
    Disallow: /cgi-bin
    Disallow: /wp-admin
    Disallow: /wp-includes
    Disallow: /wp-content/plugins
    Disallow: /wp-content/cache
    Disallow: /wp-content/themes
    Disallow: /wp-content/uploads/dynamic_avia
    Disallow: /*?*
    Disallow: /*?
    Allow: /wp-content/uploads

    Please see this article

    Best regards,
    Mike

    #1418715

    Here’s the bots file I already had. Should I replace it with yours, or keep some aspects of it?

    User-agent: *
    crawl-delay: 10
    Disallow: /feed/
    Disallow: /*/feed/
    Disallow: /xmlrpc
    Disallow: /?p=
    Disallow: /*trackback
    Allow: /wp-admin/admin-ajax.php
    Allow: /wp-content/uploads/
    Allow: /wp-content/plugins/
    Allow: /wp-*/*.css
    Allow: /wp-*/*.js

    Sitemap: https://gatehealing.com/sitemap_index.xml

    #1418716

    Hi,

    Thank you for the update.

    We made some modifications to the code and combined the rules. These changes may take a day or two to take effect.

    User-agent: *
    crawl-delay: 10
    Disallow: /cgi-bin
    Disallow: /wp-admin
    Disallow: /wp-includes
    Disallow: /wp-content/plugins
    Disallow: /wp-content/uploads/dynamic_avia
    Disallow: /*?*
    Disallow: /*?
    Disallow: /feed/
    Disallow: /*/feed/
    Disallow: /xmlrpc
    Disallow: /?p=
    Disallow: /*trackback
    Allow: /wp-*/*.js
    Allow: /wp-content/uploads
    

    Another option is to disable the post css files by adding this code in the functions.php file.

    add_filter( 'avf_post_css_create_file', '__return_false', 10);
    

    Best regards,
    Ismael

    #1418825

    Any harm in me changing my bots file to what you put, and adding the functions.php code? I’ll just start with changing my bots file, but will add the functions.php as well if y’all think that’s not overkill or harmful.

    J

    #1418833

    Hi,

    The filter will disable the CSS files for individual posts or pages and apply custom CSS rules for builder elements as inline styles instead. If this is not acceptable, you can disallow the /wp-content/uploads/dynamic_avia folder to prevent crawlers from indexing the post CSS files. It would be advisable to seek guidance from a developer or consultant who specializes in search engine optimization.

    Thank you for your patience.

    Best regards,
    Ismael

    #1418955

    a little above my head, but is that a yes or no and using both your bots file AND the functions.php code?

    J

    #1418973

    Hi,

    We would recommend disabling the post css file instead of editing your robots.txt file, as this is the safer approach to address the Ahrefs warnings. Disallowing directories and content using the robots.txt file will affect how search engines crawl the site, so we recommend consulting with an SEO specialist to provide further instructions on the proper usage of robots.txt specific to your WordPress site.

    Thank you for your patience.

    Best regards,
    Ismael

    #1418974

    Ok, so back to my original bots file (vs the one y’all provided) and just use the functions.php code, then check with my seo folks for clarity from there?

    I know I seem a bit dense here, but I’m not technical at all.
    J

    #1418980

    Hi,

    You can just add the filter in the functions.php file to disable the post css, and leave the robot.txt file as is.

    Best regards,
    Ismael

    #1418982

    Thanks Ismael,

    Again, apologies on being slow on the uptake here . . . . but leave it “as is” meaning as of the last bots changes y’all made? Or “as is” as the way I originally had it? There’s an ambiguity in what “as is” means to me here.

    J

    #1418984

    Hi,

    The way you originally had it. This seems to be the safer route because we are a bit unsure how the additional directory rules in the robot.txt file will affect the site.

    Best regards,
    Ismael

    #1418985

    Got it switched back and added the functions.php code.

    Thx!
    Jon

    #1418987

    Hi,

    No problem. You may need to wait for a while before the changes are reflected. Please feel free to open another thread if the issue persist.

    Have a nice day.

    Best regards,
    Ismael

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘broken css link warning in ahrefs crawl’ is closed to new replies.