# Prepare for SEO

SEO stands for "Search Engine Optimization", and is a set of rules and best practices to make your content discoverable and well-ranked by search engines.

Page speed, sitemaps, robot.txt are all automatically taken care of by Motif, so in this section, we'll be focused on metadata, which is a set of tags that give hints about your content to search engines.

## Set a title

By default, the title of your page is given by its file name. For our Index page, we likely want to change that. But the file needs to be called Index in order for it to be accessible at the root path /, as explained in the section on file-based routing. So instead of changing the file name, we will provide a title tag. We can do this in the page's frontmatter, which is a section at the top of the page delimited by three dashes ---. We already have a cover defined there, and will just add a line for the title:

---
title: "Welcome to my blog!"
cover: "https://tinyurl.com/3m36recy"
---


## Set a description

Similarly to the title, we can set a page description:

---
title: "Welcome to my blog!"
description: "My thoughts on design, code, and magical machines."
cover: "https://tinyurl.com/3m36recy"
---


## Use Open Graph tags

In the frontmatter, you can add a section named meta, under which you can provide any metadata tags you want. For instance, you can specify Open Graph tags, which provide a standard way for a page to expose data to search engine and on social media. Here is an example with Twitter cards data:

---
title: "Welcome to my blog!"
description: "My thoughts on design, code, and magical machines."
cover: https://tinyurl.com/3m36recy
meta:
---


## Set common tags for all pages

In addition to specific page tags, you can set tags that apply to all the pages of your website. This is done in your Motif project configuration file. Hit P to bring up the instant file search, and type motif.json to jump to the file.

Alternatively, you can access the file by heading over to your project settings (,) and hitting the Open motif.json button.

Your Motif configuration file is a JSON file that looks like this:

{
"templates": {
"**/*": "plain",
"posts/my-first-post": "blog"
},
"<meta name='viewport' content='width=device-width, initial-scale=1.0' />",
"<meta name='og:title' content='Motif' />",
"<meta name='description' content='My project on Motif!' />",
]
}


The part that we are interested in is the head part. It contains a list of HTML tags that will go into all your pages' <head> section – which is where metadata belongs. Let's set a Twitter website username here, such as a company Twitter handle, as it will be common to all our content. We also set a global title and description metadata tags, which will be used in case a specific page does not set the tags in their frontmatter:

{
...,
"<meta name='title' content='My website title' />",
"<meta name='description' content='My website description' />",
...
]
}


Note that page-specific metadata overwrites the metadata set in your Motif configuration. Only if a tag is not present in your page will it use the one, if present, in your Motif configuration.

## Set a favicon

Finally, let's update the favicon for your pages, which is the small icon that appears in the browser tab. Replace the line that starts with <link rel='shortcut icon'... with the following line:

{