What does the meta tag generator do?

The tool turns a short form into an HTML block you can paste into <head>. Only the title and description are required; everything else is optional, and empty fields never produce empty tags.

Developers can drop the block into a static site or theme template. WordPress editors can use the mapping note next to the output to fill in their SEO plugin instead. To check title truncation first, try the SERP preview.

How to use it

  1. Fill in the title and description. The counters count graphemes, so an emoji counts as one character.
  2. Add an absolute canonical URL if you have one. It is validated locally only.
  3. Choose index/noindex and follow/nofollow, plus any extra directives.
  4. Optionally open the social section for OG type, title, description, image, site name and og:locale.
  5. For multilingual pages, write one language code and URL per line, including x-default.
  6. Press Generate, read any warnings, then copy, download as .html or share.

Title, description and canonical

The title is written into <title> with text escaping and the description into a content attribute with attribute escaping. Ampersands, angle brackets and quotes cannot break the markup, and input such as </title><script> stays plain text. Turkish characters are kept as they are.

You get a warning when the title passes 60 characters or the description falls outside 70–160. These are editorial reminders, not search engine limits; real truncation depends on pixel width.

If you enter a canonical, it must be an absolute HTTP or HTTPS URL. javascript: and other schemes, embedded usernames and control characters are rejected. A valid canonical is also reused as og:url.

Open Graph and Twitter tags

Open Graph tags feed the card shown when a link is shared on social networks or in messaging apps. An empty OG title or description falls back to the regular value. The OG type is website or article.

The image URL is checked for format only; the tool never downloads it. With an image, twitter:card is summary_large_image; without one it is summary and no empty og:image tag is written. og:locale uses the underscore form, such as en_GB.

Robots options

Plain index, follow is the default behaviour, so it is not written out. Choosing noindex, nofollow or an extra directive such as noarchive or max-image-preview:large adds a single robots meta tag. Conflicting pairs cannot be selected together.

Noindex combined with a canonical triggers a warning, because the two can send mixed signals. Crawlers can only read a robots meta tag if the page is not blocked in robots.txt.

Worked example

Load example fills in a neighbourhood guide: the title “Kadıköy Coffee Guide: 12 Cafés Worth the Ferry Ride”, the OG title “Coffee & Work Spots in Kadıköy”, an empty OG description, max-image-preview:large, three hreflang lines and an image URL. Expected output:

<title>Kadıköy Coffee Guide: 12 Cafés Worth the Ferry Ride</title>
<meta name="description" content="Specialty coffee bars, quiet places to work and price notes for Istanbul’s Kadıköy district, with addresses and opening hours for every café.">
<link rel="canonical" href="https://example.com/en/kadikoy-coffee-guide/">
<meta name="robots" content="index, follow, max-image-preview:large">
<link rel="alternate" hreflang="en" href="https://example.com/en/kadikoy-coffee-guide/">
<link rel="alternate" hreflang="tr" href="https://example.com/tr/kadikoy-kahve-rehberi/">
<link rel="alternate" hreflang="x-default" href="https://example.com/en/kadikoy-coffee-guide/">
<meta property="og:type" content="article">
<meta property="og:title" content="Coffee &amp; Work Spots in Kadıköy">
<meta property="og:description" content="Specialty coffee bars, quiet places to work and price notes for Istanbul’s Kadıköy district, with addresses and opening hours for every café.">
<meta property="og:url" content="https://example.com/en/kadikoy-coffee-guide/">
<meta property="og:image" content="https://example.com/img/kadikoy-coffee-og.jpg">
<meta property="og:site_name" content="Example Guides">
<meta property="og:locale" content="en_GB">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Coffee &amp; Work Spots in Kadıköy">
<meta name="twitter:description" content="Specialty coffee bars, quiet places to work and price notes for Istanbul’s Kadıköy district, with addresses and opening hours for every café.">
<meta name="twitter:image" content="https://example.com/img/kadikoy-coffee-og.jpg">

The empty OG description falls back to the regular description in og:description and twitter:description. The & is escaped as &amp; while Turkish letters stay intact. The extra directive makes the robots tag appear, the image switches the Twitter card to the large format, and the canonical doubles as og:url.

Yoast and Rank Math fields

If Yoast SEO or Rank Math is active, enter the same values in the plugin’s post editor fields instead of pasting the block. Labels may vary slightly between versions.

TagYoast SEORank Math
title, descriptionSEO title, meta descriptionEdit snippet
canonicalAdvanced tabAdvanced tab
robotsAdvanced tabAdvanced tab: robots meta
OG/TwitterSocial tabSocial tab

Hreflang is usually output by a multilingual plugin such as WPML or Polylang rather than entered by hand.

The duplicate tag problem

When an SEO plugin already prints meta tags, adding this block to a theme file or a header scripts plugin can leave the page with two canonicals, two descriptions or two different og:image values. Search engines and social platforms then choose one themselves or may ignore the conflicting values.

After publishing, view the page source and search for rel="canonical" and og:title to confirm each appears once. Keep a single source: either the plugin fields, or this block with the plugin’s matching output switched off.

Limits and common mistakes

  • The tool generates tags; it cannot guarantee indexing or how a card will look.
  • No request is made to canonical or image URLs; check separately that they respond.
  • Hreflang codes use a hyphen: en-GB, not en_GB. Duplicate codes are an error; up to 100 alternates are accepted.
  • The hreflang set should include the page itself, and URLs with a #fragment are rejected.

Frequently asked questions

Do I need a separate OG title?

No. Empty OG fields reuse the regular title and description. Write separate copy only if you want a different tone on social platforms.

Why is there no robots tag in the output?

With the default index, follow the tag adds nothing, so it is left out.

Are the URLs I enter checked?

Only for format, in your browser. No request is sent to the page or the image.

Where should I add this block in WordPress?

With Yoast or Rank Math, don’t add it; use the plugin fields. Without an SEO plugin, add it once to your theme’s head section.

Are my inputs sent to a server?

No. Everything runs in your browser, and including inputs in a share link is optional.

Published: · Updated: