Meta tag generator

This meta tag generator creates ready-to-use code for the head tag of a web page, with the title, description, canonical URL, and Open Graph and X sharing tags, and shows a preview of the search result and the share card.

The code and the preview are created in the browser and require JavaScript. A fixed example is shown.

Page details
Characters: 47. Recommended: up to about 60.
Characters: 136. Recommended: up to about 155.
The full address of the page, for example https://example.com/page. It is also used for the og:url tag.
The full address of the image. The usual size of a large image is 1200 by 630 pixels. The image is not loaded in the preview.
Settings
Page language
The language sets the og:locale value: he_IL for Hebrew and en_US for English. For another language the tag is not added.
Text direction
The direction is used for the preview only.
Content type (og:type)
X card type (twitter:card)
Robots directives (robots)
By default the page is indexed and its links are followed, so the tag is added only when one of the options is selected.
Optional. A HEX color, for example #0f766e. It affects the address bar in some mobile browsers.
Notes
  • No notes found.
Preview
Search result

Example Site example.com › guides › hosting

How to choose hosting & a domain | Example Site

What to check before you choose hosting: storage, backups, an SSL certificate, and support, with a "Frequently asked questions" section.

Share card

https://example.com/images/hosting-guide.png

example.com

How to choose hosting & a domain | Example Site

What to check before you choose hosting: storage, backups, an SSL certificate, and support, with a "Frequently asked questions" section.

Everything runs in your browser; nothing is sent or stored.

  • In the "Page details" section, enter a title and a description. Below each field, the character count appears next to the recommended length.
  • Enter the canonical URL and the share image URL as full addresses that start with https://.
  • In the "Settings" section, choose the page language, the text direction, the content type, and the X card type.
  • To hide the page from search results, select "Do not index (noindex)".
  • The "Notes" list flags a missing, short, or long title or description, a URL that is not https, and missing image alt text.
  • Copy the code from the "Code for the head tag" field by clicking "Copy".

The title and description tags

The <title> tag sets the page title in the browser tab, and search engines usually show it as the title of the page in search results. The meta name="description" tag describes the content of the page and is often used as the text shown below the title in search results. Search engines shorten titles and descriptions based on the width of the text in pixels, so the recommendation of up to about 60 characters for the title and up to about 155 characters for the description is only an estimate. A unique title and description for each page help visitors and search engines tell similar pages on the site apart.

Canonical URL and robots directives

The link rel="canonical" tag specifies the preferred URL of the page when the same content is available at several URLs, for example with and without www, or with tracking parameters such as ?utm_source=. Search engines treat the canonical URL as a hint and usually show it in search results instead of the other URLs. The meta name="robots" tag with the noindex value keeps the page out of the search engine index, and the nofollow value tells crawlers not to follow the links on the page. A page that is blocked from crawling in the robots.txt file is not crawled, so search engines do not read the noindex tag on the page, and the page may still appear in search results when other sites link to it.

Open Graph and X cards

Open Graph tags, which start with og:, set the title, description, and image shown when a link is shared on Facebook, LinkedIn, WhatsApp, and other apps. The og:locale tag specifies the language of the page, and the og:image:alt tag describes the image for visitors who use a screen reader. The tags that start with twitter: control how the link appears on X: in the twitter:card tag, the summary value shows a small image next to the text, and the summary_large_image value shows a wide image above the text.

Values in the generated code

  • en_USthe og:locale value for a page in English.
  • he_ILthe og:locale value for a page in Hebrew.
  • noindex, followthe robots value when only "Do not index (noindex)" is selected.
  • index, nofollowthe robots value when only "Do not follow links (nofollow)" is selected.
  • noindex, nofollowthe robots value when both options are selected.
  • &amp;the encoding of the & character inside a tag value.
  • &quot;the encoding of double quotes inside a tag value, for example around the words "Frequently asked questions" in the sample description.
Did you know?

An HTML site with the meta tags you created can be hosted on static website hosting plans.

Static website hosting plans

Meta tag generator FAQ

Do I need a meta keywords tag?

You do not need a meta keywords tag, because Google does not use the tag to rank pages. That is why the meta tag generator does not create it. The important keywords for the page belong in the title, the description, and the page content.

Why is the title in search results different from the one I entered?

Search engines may shorten a long title or replace it with other text from the page, such as the main heading, when the title does not describe the content of the page well. The preview in the tool shortens a title longer than 60 characters and a description longer than 155 characters, and does not simulate a search engine replacing the title.

Why does a note say the URL is not a full https address?

The note appears when the canonical URL or the image URL is not a full address that starts with https://, such as a relative URL like /page or a URL that starts with http://. The Open Graph protocol requires full URLs in the og:url and og:image tags, and on a site with an SSL certificate, the URLs should point to the https version.

Why does the new image not appear when I share the link?

Social networks cache the link details after the first share, so a change to the tags appears only after the cache is refreshed. You can refresh the link details with the Facebook Sharing Debugger and the LinkedIn Post Inspector.

Does the code include the charset and viewport tags?

The generated code does not include the meta charset and meta viewport tags, because both tags are usually part of the site template. Keep both tags in the head tag next to the generated code, and place the meta charset tag at the start of the head tag.

How do I add the code to my site?

Paste the code inside the head tag of the page, before the closing tag. On a WordPress site with an SEO plugin, the plugin creates some of the tags automatically, so make sure each tag appears on the page only once.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement