How to add X-Robots-Tag: noindex to header because Google is indexing my robots.txt file

I have a Cloudflare page with a custom domain emaanpainters.co.nz

if i type site:emaanpainters.co.nz

Google is showing my robots.txt file being indexed.
A solution for this is to add the X-Robots-Tag: noindex header when serving robots.txt

Any help please.

Use the _headers file to apply custom headers.

https://developers.cloudflare.com/pages/platform/headers/

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.