-2

I have an up to date WordPress site, running WooCommerce and Yoast that has the following noindex set in the headers on every single page.

x-robots-tag: noindex, nofollow, nosnippet, noarchive

I'm not sure where it's coming from. The only references are in wp-admin/admin-ajax, some woocommerce plugin files, some Yoast files and a wp-includes file; nothing out of the ordinary I think.

Cloudflare is enabled which I have read can cause this issue somehow, but pausing it doesn't seem to effect anything. Yoast is configured normally and as per dozens of other sites.

I am having some difficulty understand what is causing / controlling this - and even what, when and how someone would use x-robots-tag.

This question pertains to programming and setup of the x-robots-tag and not optimisation or general SEO friendliness, I know already that I do not want this tag appearing.

Twentyonehundred
  • 2,199
  • 2
  • 17
  • 28

1 Answers1

-2

It was a configuration in my nginx config.

In '/etc/nginx/sites-enabled/' inside server {} I had a rule for 'location ~ .php` which included the line:

add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";

Commented that line out, restarted nginx and problem solved. Problem was down to my unfamiliarity with nginx and not setting up the server myself.

Twentyonehundred
  • 2,199
  • 2
  • 17
  • 28