Search code examples
seosearch-enginemeta-tags

Use search engine meta tag outside of the <head> section


I'm using a meta tag to restrict access to specific parts of a website. The problem is that I'm using a CMS and I can only insert the <meta> tag inside the <body>, because the <head> sections is part of the universally used main template. Dose the <meta> tag still work outside the <head> section?


Solution

  • You can accomplish the same effect as that meta tag using an HTTP header. The X-Robots-Tag can be set in an .htaccess file and will do the exact same thing as the meta tag. If your CMS doesn't support it you can always add it manually and it won't be affected by the CMS creates pages at all.