A standardized <head> section tested and effective for sites with more than 5m monthly organic visitors. These examples integrate a "base level" Schema Structured Data in the form of JSON-LD (Google's preferred flavor).
There are (3) major types of <head> sections for use with:
| Type | Use |
|---|---|
| WebSite | Home Page Only |
| WebPage | About Us, Contact, FAQs |
| Article | Blog, News, Articles |
There can be multiple WebPages and Articles on your site, but only one WebSite page should exist.
head
├── variables
│ ├── global.php
│ ├── website.php
│ ├── webpage.php
│ └── article.php
├── json-ld
│ ├── website.php
│ ├── webpage.php
│ └── article.php
├── website.php
├── webpage.php
└── article.php
Used in <link> tags, <meta> tags and in your JSON-LD.
Your Global Variables will be used across the site on multiple pages:
$siteName: Top level name of your website/oranization$logo: Main logo for your site$favicon: 32x32px icon you'll see in the browser tab$googlePlus: The URL for your Google+ page$facebookAppId: Find your Facebook App ID in your Facebook admin$facebookHandle: The URI string following facebook.com for your organization/site (i.e.https://facebook.com/+sampleCompany)$twitterHandle: Find this in your Twitter URL (i.e.https://twitter.com/+sampleCompany)$phone: You main contact phone number$email: Your main email address (should include match your website domain name)
It's important to keep these in one place for easy access in the future.
website.php - For use on you home page only (i.e. www.example.com)
$type:WebSite$title: 60-70 character (or 568 pixel) title for your website$description: 156 character (or 940 pixel) description of your website$robots: For most cases this should beindex,follow$url: Absolute URL for your website$author: ForWebSitethis will be the name of your site$socialImage: The "featured image" used in Facebook and Twitter when someone shares your page$socialTitle: The title seen by users on Facebook and Twitter (can be different than your regulartitle)$socialDescription: The description seen by users on Facebook and Twitter
$type:WebPage$title: 60-70 character (or 568 pixel) title specific to yourWebPage$description: 156 character (or 940 pixel) description specific to youWebPage$robots: For most cases this should beindex,follow$url: Absolute URL for yourWebPage$author: ForWebPagethis will be the name of your site$socialImage: The "featured image" used in Facebook and Twitter when someone shares your page$socialTitle: The title seen by users on Facebook and Twitter (can be different than your regulartitle)$socialDescription: The description seen by users on Facebook and Twitter
Same as WebPage but also includes and modifies:
$author: The actual human who wrote theArticle$datePub: In the format2017-09-26T08:00:00+08:00$dateMod: In the format2017-09-27T08:00:00+08:00