Hébergements Web - En-tête X-Robots-Tag: noindex injecté sur robots.txt — indexation bloquée
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

En-tête X-Robots-Tag: noindex injecté sur robots.txt — indexation bloquée

Von
Byanneceline
Erstellungsdatum 2025-03-27 18:56:51 in Hébergements Web

Bonjour,

Google Search Console indique que le fichier https://byanneceline.com/robots.txt retourne l'en-tête HTTP suivant :
X-Robots-Tag: noindex

Cela empêche Google d’indexer ce fichier, alors que je souhaite qu’il le fasse.

J’ai tenté de supprimer cette directive via le fichier .htaccess avec :

<Files "robots.txt">
    Header unset X-Robots-Tag
</Files>

Mais cela ne fonctionne pas, probablement parce que la directive est injectée au niveau serveur.

Pouvez-vous me confirmer si cette directive est ajoutée automatiquement par OVH, et dans ce cas, la désactiver ?

Merci beaucoup,


9 Antworten ( Latest reply on 2025-03-29 06:34:45 Von
TTY
)

Bonjour,

Votre robots.txt est géré par le plugin Yoast et n'inderdit aucun crawler:

# START YOAST BLOCK
# ---------------------------
User-agent: *
Disallow:

Sitemap: https://byanneceline.com/sitemap_index.xml
# ---------------------------
# END YOAST BLOCK

Bonjour @Byanneceline 

Votre fichier .htaccess contient-il la ligne :

      Options -Indexes

 

Bonjour,

Je n'ai rien de tel dans la réponse du serveur OVH:

 

HTTP/1.1 200 OK
Date: Fri, 28 Mar 2025 14:01:43 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: OVHcloud
X-Powered-By: PHP/8.3
Link: <https://byanneceline.com/wp-json/>; rel="https://api.w.org/"
Link: <https://byanneceline.com/wp-json/wp/v2/pages/11>; rel="alternate"; title="JSON"; type="application/json"
Link: <https://byanneceline.com/>; rel=shortlink
Accept-Ranges: none
Vary: Accept-Encoding

La réponse du serveur renvoie bien un :

x-robots-tag noindex, follow

Mais je ne vois pas vraiment le problème. Les robots.txt n'ont pas vocation à être indexé.
Gogole et les autres prennent quand même les instructions qui sont dedans.

s/ti/tu/

Effectivement...
J'ai juste regardé la console FF et du coup j'ai test avec Chromium :