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 (https://www.drupal.org/docs/7/site-building-best-practices/never-hack-core).
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.
- Post a Public Question
- Email Us
- Live Chat!
Thanks so much for your detailed answer. You guys are the best.
UNODATA, March 2017
I’m marking this as solved. You guys are awesome. I’ll never go anywhere else for my themes. Your service and support have been awesome and this was literally above and beyond. Thanks!
President, Nexxus Cloud LLC., April 2015
You are great! Problem solved. Thank you so much for nice and helpful support.
Schoonheid in pixels, July 2016
All is good now.
Thanks for your excellent support!
Cardinal Photo, April 2015