404 error - Virtual robots.txt missing

admin2025-01-07  3

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 ?

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 ?

Share Improve this question edited Aug 1, 2017 at 8:31 Johansson 15.4k11 gold badges43 silver badges79 bronze badges asked Aug 1, 2017 at 7:56 David HorizonefDavid Horizonef 315 bronze badges 1
  • I have no idea why it is missing but you could just upload a robots.txt via ftp. – Luckyfella Commented Aug 1, 2017 at 8:11
Add a comment  | 

1 Answer 1

Reset to default 0

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)

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736253727a147.html

最新回复(0)