Skip to content

Robots.txt file is cached by Full Page Cache of Magento #39416

Open
@dandrikop

Description

@dandrikop

Preconditions and environment

When you change the contents of the robots.txt file via Content > Design > Configuration > Search Engine Robots, the changes do not become immediately available on the front-end of the Magento website even if you refresh the Configuration cache via System > Cache Management. It seems that the page https://www.example.com/robots.txt is cached by the Full Page Cache of Magento. I tested that on Magemto 2.4.6-p7 by using REDIS as the Full Page Cache of Magento.

Steps to reproduce

  1. Visit the robots.txt file via the link: https://www.example.com/robots.txt
  2. Change the content of the robots.txt file via Content > Design > Configuration > Search Engine Robots
  3. Refresh the Configuration cache via System > Cache Management
  4. Visit again the robots.txt file via the link: https://www.example.com/robots.txt

Expected result

The new content of the robots.txt file should be viewed at https://www.example.com/robots.txt

Actual result

The old content of the robots.txt file is viewed at "https://www.example.com/robots.txt".

Additional information

The only way to make the changes of the robots.txt available at the front-end of the Magento website is by flushing the Full Page Cache. However, this work-around is not appropriate for the following reasons:

  1. Robots.txt is considered configuration, and so any configuration change should become available immediately.
  2. The Full Page Cache significantly improves the performance of the Magento front-end.
  3. The Full Page Cache may need several days to be filled again even by using intensive Cache warmers.

So, it's worth flushing the Full Page Cache only when there are applied changes affecting a large number of pages, such as the installation of a new module, or the update of existing module.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

On Hold

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions