Both Google and Bing run page JS when they crawl. You can dynamically insert meta robots tags and tests show it is respected by Google. I have not personally tested Bing in this scenario. Something you could research.
Here is the result testing that went back to 2015.
thanks for your feedback, I’m not sure I like the dynamic insertion of meta robot tags, seems like there’s room for it going wrong and doesn’t appear (at least on a quick search) to be widely promoted as a method to do this.
Does putting in a HTTP response header have any implications with webflow, i.e. since we are publishing using webflow does it need to be done elsewhere/get “undone” by the publish?
Edit: - I just found in the settings the Global Canonical Tag URL. I assume if I put https://www.mywebsite.com in there it should sort this out for me?
If you don’t want a subdomain indexed use the meta tag. If you are fine with it being indexed and just want to tell Google which URL is canonical then using the Global Canonical Tag is the appropriate option.