-
AuthorPosts
-
September 10, 2023 at 3:39 am #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
September 10, 2023 at 9:13 pm #1418689Hey 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 ConsoleUser-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
Best regards,
MikeSeptember 11, 2023 at 6:40 am #1418715Here’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-*/*.jsSeptember 11, 2023 at 6:57 am #1418716Hi,
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,
IsmaelSeptember 12, 2023 at 5:02 am #1418825Any 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
September 12, 2023 at 7:07 am #1418833Hi,
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,
IsmaelSeptember 12, 2023 at 11:41 pm #1418955a little above my head, but is that a yes or no and using both your bots file AND the functions.php code?
J
September 13, 2023 at 3:28 am #1418973Hi,
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,
IsmaelSeptember 13, 2023 at 3:42 am #1418974Ok, 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.
JSeptember 13, 2023 at 4:12 am #1418980Hi,
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,
IsmaelSeptember 13, 2023 at 4:25 am #1418982Thanks 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
September 13, 2023 at 4:36 am #1418984Hi,
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,
IsmaelSeptember 13, 2023 at 5:10 am #1418985Got it switched back and added the functions.php code.
Thx!
JonSeptember 13, 2023 at 5:45 am #1418987 -
AuthorPosts
- The topic ‘broken css link warning in ahrefs crawl’ is closed to new replies.