Robots.txt Ghost File
-
I have migrated my website hosting from Godaddy Cpanel hosting (WordPress Website) to Hostinger’s WordPress hosting 2 days back.
The transition was not easy. I had to disable WP Rocket and start using LiteSpeed Cache. There were a few errors in the beginning but I figured my way out, somehow. The problem began 2 hours back when I tried to check PageSpeed Insights. It showed no error in Desktop report but in Mobile reports it shows that Robots.txt file has errors. It showed complete HTML document of my website instead of the robots.txt file. Then I tried to reach my robots.txt file by going to mydomain/robots.txt but it kept redirecting me to my homepage.
I checked file manager and the robots.txt file was present. I deleted it and tried to create with Yoast Seo. As soon as I clicked “create robots.txt file”, it takes me to my source code. I hot back and it created a file. I saved.
But still the file was inaccessible.
Finally, I deleted the robots.txt file. But now, after going to mydomain/robots.txt it’s showing my file but with xml code in the beginning.
It’s some sort of Ghost file which Google Search Console can read and produce error to.
I have tried disabling LiteSpeed Cache, Quic.cloud CDN, Yoast SEO. I’ve tried clearing cache from CDN dashboard as well as from LiteSpeed Cache plugin.
Still, it’s showing a ghost file with wrong code. I’ve searched file manager for other robots.txt files but couldn’t find any.
Mydomain/robots.txt reads:
<?xml encoding="UTF-8"><?xml encoding="UTF-8"><?xml encoding="UTF-8"><p># START YOAST BLOCK # --------------------------- User-agent: * Disallow: Sitemap: https://mydomain/sitemap_index.xml # --------------------------- # END YOAST BLOCK</p>I’m not a developer but I can implement code changes if suggested. Plz help.
The topic ‘Robots.txt Ghost File’ is closed to new replies.