Skip to content

Commit a94b920

Browse files
committed
Document the disallow_search_engine_index option
1 parent bfd670f commit a94b920

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

reference/configuration/framework.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Configuration
7373
* :ref:`enabled <reference-csrf_protection-enabled>`
7474

7575
* `default_locale`_
76+
* `disallow_search_engine_index`_
7677
* `esi`_
7778

7879
* :ref:`enabled <reference-esi-enabled>`
@@ -384,6 +385,21 @@ method.
384385
You can read more information about the default locale in
385386
:ref:`translation-default-locale`.
386387

388+
disallow_search_engine_index
389+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
390+
391+
**type**: ``boolean`` **default**: ``true`` when the debug mode is enabled, ``false`` otherwise.
392+
393+
.. versionadded:: 4.3
394+
395+
The ``disallow_search_engine_index`` option was introduced in Symfony 4.3.
396+
397+
If ``true``, Symfony adds a ``X-Robots-Tag: noindex`` HTTP tag to all responses
398+
(unless your own app adds that header, in which case it's not modified). This
399+
`X-Robots-Tag HTTP header`_ tells search engines to not index your web site.
400+
This option is a protection measure in case you accidentally publish your site
401+
in debug mode.
402+
387403
trusted_hosts
388404
~~~~~~~~~~~~~
389405

@@ -2340,3 +2356,4 @@ a :doc:`normal workflow </workflow/usage>` or a :doc:`state machine </workflow/s
23402356
.. _`CSRF security attacks`: https://en.wikipedia.org/wiki/Cross-site_request_forgery
23412357
.. _`session.sid_length PHP option`: https://php.net/manual/session.configuration.php#ini.session.sid-length
23422358
.. _`session.sid_bits_per_character PHP option`: https://php.net/manual/session.configuration.php#ini.session.sid-bits-per-character
2359+
.. _`X-Robots-Tag HTTP header`: https://developers.google.com/search/reference/robots_meta_tag

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy