Issue with robots.txt file serving JavaScript instead of plain text

Hello,

I have noticed that the robots.txt file on my website (https://casicensurado.site/robots.txt) is not being served correctly. When I try to access it through the browser or via tools like curl, the file appears to contain JavaScript injection and is being served with the content type text/html instead of text/plain.

This issue is preventing Googlebot from reading the file correctly, which could negatively affect my site’s indexing in Google search results.

I have already tried several adjustments, including configuring the .htaccess file to force the content type to text/plain, but the issue persists.

Could you please look into this and ensure that my robots.txt file is served correctly as plain text (text/plain) without the JavaScript injection (such as the aes.js script)?

Thank you in advance for your help.

Best regards,

Hi, Access to your website outside a browser is restricted with a JavaScript security system, which will affect tools like CURL:

However, most search engine crawlers, like GoogleBot, can still properly crawl and index your website. They won’t be affected by this restriction.

7 Likes

I’m getting the following


which seems to be plain text.

4 Likes

Google’s crawler is whitelisted from the system, so it will not receive the JS code that is otherwise delivered.

5 Likes