---
title: "WebSite Schema · Unhead"
canonical_url: "https://unhead.unjs.io/docs/typescript/schema-org/api/schema/website"
last_updated: "2026-07-21T16:55:02.286Z"
meta:
  description: "Use defineWebSite() to add WebSite structured data and connect the site to its publisher, pages, language, and internal search action."
  "og:description": "Use defineWebSite() to add WebSite structured data and connect the site to its publisher, pages, language, and internal search action."
  "og:title": "WebSite Schema · Unhead"
---

Home

`
Unhead on GitHub

Switch to TypeScriptSwitch to VueSwitch to ReactSwitch to SvelteSwitch to Solid.jsSwitch to AngularSwitch to Nuxt

**Schema**

# **WebSite Schema**

[Copy for LLMs](https://raw.githubusercontent.com/unjs/unhead/refs/heads/main/docs/schema-org/5.api/9.schema/website.md)

## Schema.org WebSite

- **Type**: `defineWebSite<T extends Record<string, any>>(input?: WebSite & T)`
  Describes a website and its relationship to its WebPage nodes.

## Useful Links

- [**~~Schema.org WebSite~~**](https://schema.org/WebSite)

## Required properties

- **name** `**string**`
  The name of the website. Supply it directly; the WebSite resolver does not inherit the page title.

## Defaults

- **@type**: `**WebSite**`
- **@id**: `**${canonicalHost}#website**`
- **url**: `**canonicalHost**`
- **inLanguage**: `**inLanguage**` from resolved page metadata _(see: [**~~Schema.org Params~~**](https://unhead.unjs.io/docs/schema-org/guides/core-concepts/params))_
- **publisher**: Identity reference

## Example

```
defineWebSite({
  name: 'My Site',
})
```

## Types

```
/**
 * A WebSite is a set of related web pages and other items typically served from a single web domain and accessible via URLs.
 */
export interface WebSiteSimple extends Thing {
  /**
   * The site's home URL (excluding a trailing slash).
   */
  url?: string
  /**
   * The name of the website.
   */
  name: string
  /**
   * A description of the website (e.g., the site's tagline).
   */
  description?: string
  /**
   * The date the website was first published.
   */
  datePublished?: ResolvableDate
  /**
   * The date the website was last modified.
   */
  dateModified?: ResolvableDate
  /**
   * A reference-by-ID to the Organization which publishes the WebSite
   * (or an array of Organization and Person in the case that the website represents an individual).
   */
  publisher?: NodeRelations<Identity>
  /**
   * A SearchAction object describing the site's internal search.
   */
  potentialAction?: Arrayable<(SearchAction | unknown)>
  /**
   * The language code for the WebSite; e.g., en-GB.
   * If the website is available in multiple languages, then output an array of inLanguage values.
   */
  inLanguage?: Arrayable<string>
}
```

[~~Edit this page~~](https://github.com/unjs/unhead/edit/main/docs/schema-org/5.api/9.schema/website.md)

[~~Markdown For LLMs~~](https://raw.githubusercontent.com/unjs/unhead/refs/heads/main/docs/schema-org/5.api/9.schema/website.md)

**Did this page help you? **

[**WebPage Schema** Use defineWebPage() to add WebPage structured data. Connect page content to your site hierarchy with automatic page type detection.](https://unhead.unjs.io/docs/schema-org/api/schema/webpage) 

**On this page **

- [Schema.org WebSite](#schemaorg-website)
- [Useful Links](#useful-links)
- [Required properties](#required-properties)
- [Defaults](#defaults)
- [Example](#example)
- [Types](#types)