Support Center

How can I insert a metatag in the theme? Should I edit the file "node.html.twig”?

Last Updated: Oct 13, 2016 03:35PM EEST
It is generally not advised to directly add markup in the head through template files as it could cause issues on your site.

The recommended way to add meta information to the head is through the metatag module. It also supports tags that are used by social media sites such as Facebook or Twitter. 

Alternatively, and if the metatag module does not cover your needs, you can the edit head of the site through the html.html.twig file. Please use a dev instance of your site to make sure that everything works OK before you make changes on your production server.

If a certain theme does not contain this template by default, you should copy it from core/themes/classy/templates/layout/html.html.twig and paste it into the templates folder of your theme.

DO NOT edit the html.html.twig directly into the original folder (

After you have made your changes clear your Drupal cache so that your site is aware of the new files and edits you have made.

Contact Us

[email protected]
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found