Verification
Verification renders <meta> tags that prove site ownership to search engines and webmaster tools. It is scoped to emitting those verification tags only and does not interact with crawling or indexing behavior directly.
| prop | type | default | required | description |
|---|---|---|---|---|
google | string | - | No | Google Search Console verification token. Renders as <meta name="google-site-verification">. |
yandex | string | - | No | Yandex Webmaster Tools verification token. Renders as <meta name="yandex-verification">. |
bing | string | - | No | Bing (and Yahoo) Webmaster Tools verification token. Renders as <meta name="msvalidate.01">. |
others | { name: string; content: string }[] | - | No | Additional verification entries for other providers. Each entry renders a <meta> tag with the given name and content. |
Examples
Section titled “Examples”Input:
<Verification google="abc123" />Output:
<meta name="google-site-verification" content="abc123" />Automatic
Section titled “Automatic”Uses integration headTags.verification when no props are provided.
Input:
<Verification />Output (when integration config has headTags.verification: { google: "abc123" }):
<meta name="google-site-verification" content="abc123" />Complete usage
Section titled “Complete usage”Input:
<Verification google="google-token" yandex="yandex-token" bing="bing-token" others={[{ name: "p:domain_verify", content: "pinterest-token" }]}/>Output:
<meta name="google-site-verification" content="google-token" /><meta name="yandex-verification" content="yandex-token" /><meta name="msvalidate.01" content="bing-token" /><meta name="p:domain_verify" content="pinterest-token" />Decisions Made
Section titled “Decisions Made”The others prop handles any additional provider
Section titled “The others prop handles any additional provider”Built-in props cover the most common search engines. Providers outside that set, such as Pinterest (p:domain_verify) or Naver (naver-site-verification), can be added through the others array without requiring component changes.
Integration config can define global verification tokens
Section titled “Integration config can define global verification tokens”When no props are provided, the component falls back to headTags.verification. This allows tokens to be configured once in the integration and inherited across all pages.
Source code
Section titled “Source code”---import config from "virtual:eminence-astro-suite/head-tags";
import { hasAnyProp } from "../utils";
interface Props { /** * Google Search Console verification token. * Renders as `<meta name="google-site-verification">` when provided. */ google?: string; /** * Yandex Webmaster Tools verification token. * Renders as `<meta name="yandex-verification">` when provided. */ yandex?: string; /** * Bing/Yahoo Webmaster Tools verification token. * Renders as `<meta name="msvalidate.01">` when provided. */ bing?: string; /** * Additional verification entries for other providers. * Each entry renders a `<meta>` tag with the given name and content. */ others?: VerificationEntry[];}
type VerificationEntry = { name: string; content: string;};
const { google, yandex, bing, others } = hasAnyProp(Astro.props) ? Astro.props : (config.verification ?? {});---
{google && <meta name="google-site-verification" content={google} />}{yandex && <meta name="yandex-verification" content={yandex} />}{bing && <meta name="msvalidate.01" content={bing} />}{others?.map(({ name, content }) => <meta name={name} content={content} />)}