Reputation: 1427
According to Google, you should add a markup data in order to include your site name in the search results:
In their example of Microdata usage, they attach the website name to the page title
:
<head itemscope itemtype="http://schema.org/WebSite">
<title itemprop='name'>Your WebSite Name</title>
<link rel="canonical" href="https://example.com/" itemprop="url">
But obviously page titles are not the same as website name!
What am I missing here?
Upvotes: 3
Views: 1454
Reputation: 96597
Microdata can be used on any HTML5 element (while some elements come with special rules), so you don’t have to use the title
element.
If you want to keep the markup in the head
, or if you don’t have the site name as visible content on your homepage, you could use the meta
element:
<head itemscope itemtype="http://schema.org/WebSite">
<title>Welcome to Foobar!</title>
<meta itemprop="name" content="Foobar" />
<link itemprop="url" href="https://example.com/" />
</head>
But if you have the site name as visible content, for example in the page header, you could make use of it:
<header itemscope itemtype="http://schema.org/WebSite">
<h1 itemprop="name"><a itemprop="url" href="https://example.com/">Foobar</a></h1>
</header>
Upvotes: 4