Make WordPress Core

Opened 7 years ago

Last modified 6 years ago

#18841 closed defect (bug)

Sites with default permalinks do not return 'robots.txt' — at Version 1

Reported by: mbijon Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.3
Component: Permalinks Keywords: 2nd-opinion dev-feedback close
Focuses: Cc:

Description (last modified by dd32)

Currently there is no .htaccess file when Permalinks are on the default (ie: /?p=123) setting.

Without an .htaccess file Apache does not direct requests for non-existent files to WordPress. Directing the request to WP is needed so the 'do_robots' or 'do_robotstxt' actions can respond with the rules set by the user in Permalink Settings.

  • Servers other than Apache likely have the same problem, but I have not tested them
  • This occurs in 3.2.1 and 3.3

I've marked severity 'major' since this undermines the Privacy Settings panel & may not meet user expectations. Please modify if this is not appropriate.

Change History (1)

#1 @dd32
7 years ago

  • Description modified (diff)

The "Privacy" settings are really named incorrectly to start with, They're simply a request, and not one which Bots have to respect (and certainly don't).

As you've noted, without Pretty Permalinks enabled, robots.txt is unable to be processed, There's another ticket to enable them by default, however, for technical reasons, it's not always possible to enable them, thus, they're not enabled by default.

One option would be to disable the Privacy settings when mod_rewrite isn't enabled.

See also: #16416

Note: See TracTickets for help on using tickets.