Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3676 Vistas

I've an issue with my robots.txt, on page speed insights and search console it's reported some errors:


Line #ContentError
1
Unknown directive
2

User-agent: *

Unknown directive
4
Syntax not understood

even if the robot.txt seen from web is without doctype or

tag.


Can you please help?

Avatar
Descartar
Mejor respuesta

It seems that there may be an issue with the formatting of your robots.txt file. The errors reported by PageSpeed Insights and Search Console suggest that there are unknown or incorrect directives in your robots.txt file.

Here are a few things you can check to resolve this issue:

  1. Make sure that your robots.txt file is located at the root of your website's domain (e.g. www.example.com/robots.txt). If it's not located there, search engine bots may not be able to find and read it.

  2. Check the syntax of your robots.txt file to ensure that it's properly formatted. Each directive should be on a separate line, and the file should be saved in plain text format (not HTML or any other format).

  3. Verify that the directives in your robots.txt file are valid. The User-agent directive should be followed by the name of the search engine bot you want to control (e.g. Googlebot), and the Allow and Disallow directives should be followed by the URL paths you want to allow or disallow crawling (e.g. Allow: /blog/).

  4. If you're using Odoo 11 to manage your website, you may want to check if there are any add-ons or customizations that could be affecting the robots.txt file. Make sure that any changes you make to the robots.txt file are reflected in Odoo as well.

Once you've made any necessary changes to your robots.txt file, you can resubmit it to the Google Search Console to ensure that it's being correctly read and interpreted by search engine bots.

Avatar
Descartar
Autor

Hi,
the issue is with the website_lazy_load_images module, it is adding doctype and formatting on the robot.txt file, I've downloaded from github the last version but it still has the bug.

The robots.txt file is an important file for search engines to crawl your website effectively. If there is an issue with the formatting or content of the robots.txt file, it can affect your website's visibility on search engines.

Regarding the issue with the website_lazy_load_images module adding doctype and formatting on the robots.txt file, you can try the following steps to resolve it:

Disable the website_lazy_load_images module temporarily and check if the issue is resolved.
If disabling the module resolves the issue, then try to update the module to the latest version or reach out to the module developers for a fix.
If the issue persists even after updating the module, then try to manually modify the robots.txt file and remove any unwanted formatting added by the module.

You can also try testing your website on other SEO tools like Google's Mobile-Friendly Test, GTmetrix, or Pingdom to check if there are any other issues that need to be resolved to improve your website's performance and visibility on search engines.

Autor

Hi thank you for your response,
I've already disabled the website_lazy_load-images module it the issue is resolved, this is the reason why I'm sure it is responsible for the defect.

I've also already updated teh module with the last version available, but ths issue still persist.

I can't , manually update the robot.txt, because the lazy_load module run on top and wrap it.

Testing it with PageSpeedInsight I found the issue.

If disabling the website_lazy_load-images module resolved the issue with the robot.txt file, it's possible that there is a bug in the module that needs to be addressed.

In this case, I would suggest reaching out to the developer of the module to report the issue and ask for assistance in resolving it. You can also try checking the module's issue tracker on GitHub to see if others have experienced similar issues and if there are any suggested solutions or workarounds.

If you are unable to resolve the issue with the module and it is causing problems for your website, you may need to consider using an alternative solution for lazy loading images or find another way to optimize your website's performance.

Publicaciones relacionadas Respuestas Vistas Actividad
1
feb 25
738
2
jul 24
1959
1
jun 24
4492
1
ene 24
2223
1
oct 23
10103