Variables have become a staple of Yoast SEO. Variables make it possible to automate certain processes on your site. They also make it easy to change large batches of meta descriptions for instance, since you only have to change the structure of the variable – the site fills in the data automatically. Here, we’ll take a closer look at the Titles and Meta variables in Yoast SEO.
What is a variable?
First things first: a variable is a name or a symbol that stands for a value. For instance, Yoast SEO uses the variable
%%sitename%% to get the site name from the site itself. This way, you, as a user, don’t have to type in this information by hand. Now, when the name of the site changes, the variable automatically gets the new name from the site. If you had this hard-coded in your site, you’d have to change everything manually – everywhere. Consider doing this on hundreds of pages and you’ll start to see how powerful variables are.
How does Yoast SEO use variables?
Yoast SEO uses variables to give you the freedom and flexibility you need when working on your SEO. It makes it much easier to find a common ground for your text fields. What’s more, if you ever need to change something, variables let you do this as quickly as possible.
You can only find the relevant options in the Titles and Metas section of the Yoast SEO plugin if you activate the advanced settings. There you’ll find loads of options for setting variables to automate your SEO efforts. The full list of variables is listed on the HELP tab of the plugin. Just go to SEO → Titles & Metas and click the help tab in the top right. You can also check our knowledge base article on Titles and Metas variables.
You are free to change any of the settings as you see fit, but remember, the default settings are almost always a great fit for any site. That being said, you can set variables for:
- The homepage
- Site title
- Custom types
How to set variables in Yoast SEO
You can use variables in a multitude of ways. Most site-owners only use the most basic ones, while someone more at home in SEO might use the advanced ones. There are even variables for use with WooCommerce, so you can automatically extract product information from your store to use in the metadata. In this post, we’ll keep it simple and give a small example. Let’s look at the different variables that you can use to determine the title of a post on a site.
* Open the Yoast SEO advanced settings and go to Titles and Metas.
* Go to the Post section and find the Title template field.
* The field is prepopulated, but you can change it to whatever you want.
* If you need the list of supported variables, click on Help Center.
If you want, you can edit the SEO title per post in the snippet editor of Yoast SEO. There, you’ll find the title according to the variables you’ve chosen. In addition, you also get the option to override that title with a custom-made variant if you think that’ll attract more clicks in the search engines.
The default title variable string is:
%%title%% %%page%% %%sep%% %%sitename%%
Which, for the post you are now reading, leads to:
These variables combined form the SEO title of the post. In this string, the title takes the title of the post, adds a page number if any (f.i. page 3 of 4), the separator symbol you picked and the site name of the site it’s posted on. You could add lots of other variables in there, but remember, you’re working with limited space for the snippets. If you’d add a
%%category%% for instance, the title would become too long and Google would cut it off. Try to find a middle ground between readability, findability and branding. Yes, your branding is important, so don’t omit
Using variables for SEO
Yoast SEO supports a wide range of variables and they can be used for almost any situation. You should, however, always ask yourself if the change you want to make improves your metadata. If not, why not let the default settings do their work? Experienced SEOs will enjoy using the advanced variables and online store owners can make use of the extra WooCommerce variables. For the rest of you? Don’t overdo it.
Join To Our Newsletter
You are welcome