Skip to content

How to Create Meta Tags for SEO: A Step-by-Step Guide

Techtruthin guide image: how to create meta tags for SEO, with title, description, Open Graph and robots tag examples

Meta tags are short pieces of code in a page’s <head> that tell search engines and apps what the page is and how to treat it. For SEO, only a few of them matter. This guide walks through creating them in order: deciding which tags a page needs, writing the title and description, adding the right robots and sharing tags, putting the code on your site and checking that Google can read it. The rules come from Google’s Search Central documentation and the Open Graph protocol, linked at the end; where a tip is our own suggestion, the text says so.

Step 1: Decide which meta tags the page needs

Google keeps a list of the meta tags it supports, and it says it ignores the ones it doesn’t. That list is shorter than many older SEO checklists suggest. For a normal page you want people to find, you need:

  • A <title> element. Strictly speaking it isn’t a meta tag, but it is one of the main sources Google uses for the clickable headline in search results, so it comes first.
  • A meta description, the summary Google may show under that headline.
  • Charset and viewport tags. These set the text encoding and tell phones how to display the page. Google recommends UTF-8, and treats a viewport tag as a sign the page works on mobile. Most themes and website builders add both for you.

Some pages need more. A thank-you page or a test page may need a robots tag to keep it out of search. A page you plan to share on social media benefits from Open Graph tags. Each of those is covered below.

You can skip the meta keywords tag. Google’s documentation says it “is not used by Google Search” and has no effect on indexing or ranking. Time spent on it is better spent on the title and description.

Step 2: Write the title tag

The title does two jobs: it names the browser tab, and it is one of the main sources Google uses for the headline of your result, which Google calls the title link. Google’s title link guidelines boil down to four habits, plus a note on length.

Describe the page, plainly

Google asks for titles that are descriptive and concise, and it gives “Home” and “Profile” as examples of titles that are too vague. Say what someone gets on the page. For a guesthouse in Cape Town, “Sea-View Rooms in Camps Bay, Cape Town | Seabreeze House” is clearer than “Welcome to Seabreeze House”, because it answers the question the searcher typed.

Give every page its own title

Google specifically warns against repeated or boilerplate titles. Its example is an online shop that titles every product page “Cheap products for sale”, which makes the pages hard to tell apart in results. If your site was built from a template, check the pages it created: blog archives, product variants and location pages are often left with the same title.

Don’t stuff keywords

Repeating near-identical words, as in “Candles, handmade candles, candle shop, candles Toronto”, is the keyword stuffing Google’s guide tells you to avoid. Use the phrase once, naturally, and spend the remaining space on something that makes the page worth clicking.

Put the brand at one end

Google suggests adding your site name at the start or the end of the title, separated by a hyphen, colon or vertical bar. We suggest the end for most small businesses, because the useful words then show first.

How long should it be?

Google’s guide sets no limit on title length, but the title link is cut short as needed to fit the device width. Because the cut-off depends on width, a title full of wide letters like W and M runs out of room sooner than one of narrow letters. Our suggestion is to put the words that matter in the first half, so they survive on a phone.

Our Meta Tags Generator measures your title’s width in pixels against an estimate of a desktop result, about 580 pixels, and warns you when it may be cut. Treat the warning as a guide, not a hard rule.

One thing a good title can’t guarantee is that Google uses it word for word. Title links are fully automated, and Google may build one from your main heading, the og:title tag, link text pointing at the page and other sources when it thinks they describe the page better. A clear, unique title that matches the page’s main heading may make Google less likely to replace it.

Step 3: Write the meta description

The meta description is a summary for people choosing between results. Google’s snippet documentation explains that Google mainly builds snippets from the page’s own text, and uses the meta description when it describes the page more accurately. It is a suggestion, not a guarantee.

What Google says makes a description useful:

  • It is unique to the page. Identical or near-identical descriptions across a site “aren’t helpful”, in Google’s words.
  • It carries real facts. Google mentions details like the author, date, price, age or manufacturer. For a freelance translator in Mexico City, that might be the language pairs, the turnaround time and whether certified translations are offered.
  • It reads like a sentence. Google says descriptions made of long strings of keywords are less likely to be shown.
  • It isn’t too short. Google’s “bad” example is a product described only as “Mechanical pencil”.

Again, there is no limit; the snippet is cut to fit the screen. Write one or two complete sentences and put the most persuasive part first. The generator’s preview shows roughly where a desktop result would cut it.

Step 4: Add a robots tag only when you need one

By default Google treats every page as “index, follow”, and its robots meta tag guide says you don’t need to write that out. Add a robots tag only to change the default. The rules you are most likely to use:

  • noindex keeps the page out of search results. It suits thank-you pages, internal search results and drafts. People with the link can still open the page.
  • nofollow asks Google not to follow the links on the page. none is the same as noindex, nofollow.
  • nosnippet stops Google showing a text snippet. Google notes that it also keeps the content from being used as a direct input for AI Overviews and AI Mode, so avoid it on pages where you want a text snippet or a place in those AI features.
  • max-image-preview:large allows a large image preview in results.

One mistake to avoid is mixing noindex with a robots.txt block. Google can only read a meta tag on a page it is allowed to crawl. If robots.txt disallows the page, Google never sees the noindex, and Google’s title link guide warns that blocking crawling may not always prevent a page from being indexed. To keep a page out of search, let Google crawl it and use noindex. Robots.txt has a different job: it controls crawling. On 30 October 2026 Google also announced plans to read an AI training preference there, covered in our guide to Google’s shared AI training opt-out.

Step 5: Add Open Graph tags for sharing

Many apps, such as Facebook, LinkedIn and WhatsApp, read Open Graph tags to choose the title, text and picture shown when someone shares your link. The Open Graph protocol lists four required properties: og:title, og:type, og:image and og:url. og:description is optional, but adding one gives you control over the text shown under a shared link. If you share pages on social media and want to see which posts bring visitors, add campaign tags with our UTM Builder; those go in the link itself, not in meta tags.

They aren’t on Google’s list of supported meta tags for indexing, but they aren’t irrelevant to search either: og:title is one of the sources Google lists for building title links. Keep it consistent with your title tag.

A complete example

Here is the full set for a product page of a small online shop selling handmade candles. The Meta Tags Generator writes a block like this for you:

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Cedar & Fig Soy Candle, 50-Hour Burn | Ember & Wick</title>
<meta name="description" content="Hand-poured cedar and fig soy candle with a cotton wick and about 50 hours of burn time. Ships in recyclable packaging.">
<meta property="og:title" content="Cedar & Fig Soy Candle | Ember & Wick">
<meta property="og:type" content="website">
<meta property="og:description" content="Hand-poured cedar and fig soy candle, about 50 hours of burn time.">
<meta property="og:url" content="https://example.com/cedar-fig-candle/">
<meta property="og:image" content="https://example.com/img/cedar-fig.jpg">

There is no robots tag, because the page should be indexed, and no keywords tag. The title leads with the product, the description gives facts a buyer compares, and the brand sits at the end of both titles.

Step 6: Put the tags on your site

Where the tags go depends on how the site is built:

  • WordPress with an SEO plugin: type the title and description into the plugin’s fields for each page instead of pasting code. The plugin writes the tags, and pasting your own as well creates duplicates.
  • Shopify, Wix, Squarespace and similar builders: use the SEO or search listing section in each page’s settings.
  • A hand-coded page: paste the block between <head> and </head>, replacing any older title or description.

Google’s meta tags page also advises care with tags added by JavaScript after the page loads. Tags written into the page’s HTML are the safest choice; SEO plugins normally output them this way.

Step 7: Check that Google sees them

Open the live page, right-click and choose “View page source”, then search for <title and name="description". You should find exactly one of each. Two titles usually means a theme and a plugin are both writing one.

If the site is in Google Search Console, the URL Inspection tool shows what Google read, and Google’s meta tags page suggests it for exactly this check. Google has to recrawl a page before a new title appears, and its title link guide says changes can take a few days to a few weeks to show.

Meta tag questions

What are the most important meta tags for SEO?

The title element and the meta description, on every page. Add charset and viewport (most themes do this already), a robots tag only when you want to change Google’s default, such as keeping a page out of search, and Open Graph tags for pages people share.

How do I create meta tags for my website?

Write a unique title and a one- or two-sentence description for each page. Then either type them into your SEO plugin or website builder’s page settings, or paste the HTML tags into the page’s head section. A meta tags generator writes the code for you.

Do meta keywords still matter?

Not for Google. Its documentation says the meta keywords tag is not used by Google Search and has no effect on indexing or ranking. You can leave it out.

How many characters should a title tag and meta description have?

Google sets no character limit for either. Both are cut to fit the device width, so put the important words first and check a preview. Because the cut-off depends on width, a preview that measures pixels is a closer guide than a character count.

Why isn’t Google showing my meta description?

Google mainly builds snippets from the page text and uses the meta description when it describes the page better for that search. Descriptions that are duplicated, very short or lists of keywords are less likely to be used. Also check the page has been recrawled since you added it.

Sources