Google gives me a ton of non working links from my widget!
The widget links come from Telegram.
So there is no way for you to set all links in this iframe as “noindex”?
Updating the links will need some custom code. You may check the plugin widget handling code to see the appropriate filter to hook into.
I have solved this by adding a location block X-Robots-Tag header to my nginx proxy config. (I had to repeated the proxy config from the / location to made this work.)
location ~ /wptelegram {
add_header X-Robots-Tag "noindex, nofollow, noarchive, nosnippet"; proxy_pass https://111.111.111.111:7081; proxy_hide_header upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; access_log off; proxy_cache_key "$scheme$request_method$host$request_uri"; proxy_no_cache $no_cache $http_pragma $http_authorization $arg_nocache; proxy_cache_bypass $no_cache $http_pragma $http_authorization $arg_nocache; proxy_cache example.com_proxy; proxy_cache_valid "5"; proxy_cache_use_stale http_500 http_502 http_503 http_504 updating; proxy_cache_background_update on;}
Great. Thank for sharing that.