Archived topic
Noindex using head hook meta tag
5 replies · Started by Michael on August 8, 2022
Hi there
Just a quick question. I'm going to use a head hook for the entire site to noindex a staging site. I was told by my hosting company that there's no guarantee the staging sites I have open won't be indexed by google.
Once I add the <meta name="robots" content="noindex" /> to the head hook, will removing it from the PHP file be as easy as deleting the meta tag and re-saving when I go live?
thanks
Michael
Hi Michael,
Yes, you can just set the hook element to draft if and when you want it disabled.
thanks Fernando-
do I need to click the 'execute php' box in the hook for it to work, or is just <meta name="robots" content="noindex" /> enough?
Hi there,
do not check the Execute PHP option, its not required in this instance as you're only adding HTML in the hook.
thanks David- got it sorted. Awesome help as always- -thanks for your patience. ^^
You're welcome