Virtual robots.txt missing

on every WordPress installation there is a default virtual robots.txt file with the following

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

but on my 2 last project /robots.txt give me a 404 instead.

  • I tried to disable all plugin
  • I tried to switch theme with a blank one
  • Tried to look on another older project which I updated last week and robots.txt is working

This not server related because it work on my local environment with older project

Any idea why ?

Topic robots.txt 404-error Wordpress

Category Web


Nevermind. It just doesn't work when wordpress is in a subfolder.

(robots.txt should be on website root so just create your own if wordpress is in a subfolder)

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.