# How to add meta tags / Custom head html to my hosted page entries?

**URL:** <https://forum.builder.io/t/how-to-add-meta-tags-custom-head-html-to-my-hosted-page-entries/1074>\
**Category:** Technical Questions\
**Tags:** hosting\
**Created:** [September 28, 2021, 6:37pm UTC](https://forum.builder.io/t/how-to-add-meta-tags-custom-head-html-to-my-hosted-page-entries/1074 "2021-09-28T18:37:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aziz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/aziz/32/2551_2.png) [@aziz](https://forum.builder.io/u/aziz)\
**Post date:** [September 28, 2021, 6:37pm UTC](https://forum.builder.io/t/how-to-add-meta-tags-custom-head-html-to-my-hosted-page-entries/1074/1 "2021-09-28T18:37:20Z")

</div>

If you’re using builder for hosting ( custom domain or a builder domain (\*.builder.live) , you can control what get sent in the head in the html response on that domain, to do so:

On the page entry you’d like to change its head html (for favicon of robots meta tags for example), head to the data tab and scroll to `Edit content js + css`

![Screen Shot 2021-09-28 at 11.32.43 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/1X/5ea571baab55fdd2d6c2849c46b7abe1f0aca7dc.png)

And in the JS section, type in

```auto
// example for adding favicon and noindex meta tag
state.customHeadHtml = `
  <link rel="icon" type="image/png" href="..." />
  <meta name="robots" content="noindex,nofollow" />
`

```

Alternatively if you only care about changing meta tags, you can have a metaTags object on the state and assign each tag to whatever you content you need

```auto

state.metaTags = {}

state.metaTags['og:title'] = 'My dynamic title'
state.metaTags.description = 'My dynamic description'
state.metaTags.title = 'My dynamic page title'
state.metaTags['twitter:card'] = 'Summary'
state.metaTags.robots='noindex,nofollow'

```

becomes (in the `<head>` of your page):

```auto
<title>My dynamic title</title>
<meta name="description" content="My dynamic description">
<meta name="og:title" content="My dynamic title">
<!-- etc -->

```

---

<div class="post-metadata">

**Author:** ![manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@manuel](https://forum.builder.io/u/manuel)\
**Post date:** [March 13, 2022, 1:21pm UTC](https://forum.builder.io/t/how-to-add-meta-tags-custom-head-html-to-my-hosted-page-entries/1074/3 "2022-03-13T13:21:09Z")

</div>

> [@aziz](#):
>
> `state.metaTags = {}`

I tried this one but the meta tags didn’t show in the header. Can someone help?

state.metaTags = {}

state.metaTags[‘og:title’] = ‘My dynamic title’  
state.metaTags.description = ‘My dynamic description’  
state.metaTags.title = ‘My dynamic page title’  
state.metaTags[‘twitter:card’] = ‘Summary’  
state.metaTags.robots=‘noindex,nofollow’

---

<div class="post-metadata">

**Author:** ![logan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/logan/32/5564_2.png) [@logan](https://forum.builder.io/u/logan)\
**Post date:** [March 14, 2022, 12:43pm UTC](https://forum.builder.io/t/how-to-add-meta-tags-custom-head-html-to-my-hosted-page-entries/1074/4 "2022-03-14T12:43:46Z")

</div>

Hi @manuel !

May we see your implementation of this code and where you’ve placed it?

Thanks,  
Logan from Builder Account Support

---

<div class="post-metadata">

**Author:** ![manuel](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@manuel](https://forum.builder.io/u/manuel)\
**Post date:** [March 27, 2022, 11:41pm UTC](https://forum.builder.io/t/how-to-add-meta-tags-custom-head-html-to-my-hosted-page-entries/1074/5 "2022-03-27T23:41:22Z")

</div>

@logan Sorry for the late reply. I tried putting them on the if condition isBrowser

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/d/de98f9aea5a02b3a551fcde6e50483297932a589.png)

---

<div class="post-metadata">

**Author:** ![l.simoes](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@l.simoes](https://forum.builder.io/u/l.simoes)\
**Post date:** [September 24, 2024, 7:35am UTC](https://forum.builder.io/t/how-to-add-meta-tags-custom-head-html-to-my-hosted-page-entries/1074/6 "2024-09-24T07:35:28Z")

</div>

Nope. It does not work.
