BUILDER

Features

Developers

Documentation

Pricing

Github

Docs

App

This page was made in Builder!

USER GUIDES

Creating Content

Learning the visual editor

Responsive design tricks

Saving layers as templates

Importing your site pages

Connecting custom data

Interactive pages with state and actions

Creating reusable components with Symbols

Targeting and scheduling content

Building custom forms

How To

Sidebar Menu

Dropdown Menu

Launch Modal

Platforms

Shopify

Wordpress

Custom

DEVELOPER GUIDES

Guides

Quick start

SEO optimizing Builder.io content

Creating custom models

Using custom fields

Enable on-site previewing and editing

Dynamic URLs and advanced data fetching

Adding Custom Code

Using 3rd party libraries

Import HTML

Extending Builder.io with plugins

REST API

HTML API

Content API

GraphQL API

Webhooks

Write API

React

Getting started

Using Next.js

Using Gatsby

Using your React components in Builder

New!

Components-only mode

Triggering custom actions

Angular

Ruby on rails

Webcomponents

Github

SEO Optimizing Builder.io Content

Builder.io is a great tool for SEO optimizing your site. To ensure you take best possible advantage of SEO with Builder.io content, follow the tips below!

Setting page metdata

The most important thing you should do is ensure you set page metadata like the page title. To do this, you can create custom fields for any attributes worth passing through to your pages

Creating custom fields

Most page models by default have a title field. To create your own, or make a new field for SEO metadata, head over to the /models page, select the relevent model (e.g. your page model) and create a new custom field for it. For this example we'll create a text field called title

Setting custom field values in content

When creating content instances for models with custom fields, you can add values for each field from the options tab. Fields marked as required must be filled in in order to publish the content

Rendering the custom fields into your pages

Now, most importantly, you can render these fields into your pages however you need. Take a look at the examples below for implementations of our new title field

HTML API

Next.js

Gatsby

// Node.js example
// Run when your code doesn't match a page to check Builder for one
let page = await request(
  'https://cdn.builder.io/api/v1/html/page?url=' + encodeURIComponent(request.url) + '&apiKey=' + apiKey
)

if (page) {
  // Use any templating language, just put the html between your header and footer
  res.send(`
    <head>
      <title>${res.data.title}</title>
    </head>
    <body>
      /* Your header */
      ${res.data.html}
      /* Your footer */
    </body>
  `);
} else {
  // Send 404 page
}
View the full example code

Extend, extend!

The most important part of using custom fields are you can use them for so many use cases! Try making file fields for meta tags like og:image, or boolean fields for flagging which pages should be crawled vs no-crawl'd using the meta robots tag.