---
title: "Deduping Nodes · v2 · Unhead"
meta:
  "og:description": "How to add multiple of the same node to your schema graph."
  "og:title": "Deduping Nodes · v2 · Unhead"
  description: "How to add multiple of the same node to your schema graph."
---

**Core Concepts**

# **Deduping Nodes**

**On this page **

- [How does node deduplication work?](#how-does-node-deduplication-work)
- [How do I add multiple nodes of the same type?](#how-do-i-add-multiple-nodes-of-the-same-type)
- [How do I replace a node instead of merging?](#how-do-i-replace-a-node-instead-of-merging)

**Quick Answer:** Schema.org nodes are automatically deduplicated by their `@id`. Only one node of each type (like `WebPage`) can exist by default. Later definitions merge with earlier ones unless you specify a custom `@id`.

## [How does node deduplication work?](#how-does-node-deduplication-work)

When generating many of the Schema.org nodes a default global `@id` is used to help with best practices.

For example:

```
import { defineOrganization, useSchemaOrg } from '@unhead/schema-org/solid-js'

useSchemaOrg([
  defineOrganization() // generates the nodes with an #identity id
])
```

This allows the node relations to be automatically mapped for best practices.

```
import { defineWebPage, useSchemaOrg } from '@unhead/schema-org/solid-js'

useSchemaOrg([
  defineWebPage() // knows to link the #identity id
])
```

## [How do I add multiple nodes of the same type?](#how-do-i-add-multiple-nodes-of-the-same-type)

The default `@id` can prevent having multiple nodes of the same type. Provide your own `@id` to create separate nodes:

```
import { defineOrganization, useSchemaOrg } from '@unhead/schema-org/solid-js'

useSchemaOrg([
  defineOrganization({
    '@id': '#some-company'
  })
])
```

## [How do I replace a node instead of merging?](#how-do-i-replace-a-node-instead-of-merging)

Use `tagDuplicateStrategy: 'replace'` to fully replace a node instead of merging properties:

```
import { defineOrganization, useSchemaOrg } from '@unhead/schema-org/solid-js'

useSchemaOrg([
  defineOrganization({
    '@id': '#some-company',
    'name': 'Bar Company',
    'url': 'https://bar.com',
  }),
])

useSchemaOrg([
  defineOrganization({
    '@id': '#some-company',
    'name': 'Foo Company',
  })
], {
  tagDuplicateStrategy: 'replace'
})

// Replaced!
// {
//   '@id': '#some-company',
//   name: 'Foo Company',
// }
```

[Edit this page](https://github.com/unjs/unhead/edit/v2.1.2/docs/v2/schema-org/2.guides/1.core-concepts/2.deduping-nodes.md)

**Did this page help you? **

[**Introduction** Learn more about Unhead Schema.org.](https://unhead.unjs.io/docs/v2/schema-org/guides/get-started/overview) [**Supported Nodes** The nodes available for the Schema.org integration.](https://unhead.unjs.io/docs/v2/schema-org/guides/core-concepts/nodes)

**On this page **

- [How does node deduplication work?](#how-does-node-deduplication-work)
- [How do I add multiple nodes of the same type?](#how-do-i-add-multiple-nodes-of-the-same-type)
- [How do I replace a node instead of merging?](#how-do-i-replace-a-node-instead-of-merging)