How to Add Meta Tags to Your Website
Updated 2026-06-21
To add meta tags to your website, place title and description tags, plus Open Graph and Twitter card tags, inside the head section of each page's HTML — then add a robots.txt file at your domain root to control crawling. The fastest way to get every tag right is to fill in a form and copy generated, preview-checked markup with the Meta Tag & Robots.txt Studio.
The core tags every page needs
Search engines and social platforms read a small set of tags from your page head. At minimum, include:
- title — the clickable headline in search results. Aim for roughly 50–60 characters so it doesn't get truncated.
- meta description — the snippet under the title. Keep it around 150–160 characters; it doesn't directly rank you, but a sharp description lifts click-through.
- meta viewport — required for mobile rendering.
- link canonical — points to the preferred URL so duplicate pages don't compete.
The studio generates all of these and shows a live SERP preview, so you can see exactly where Google would cut off your title or description before you ship it.
Add Open Graph and Twitter cards for sharing
When someone pastes your link into Slack, LinkedIn, Facebook, or X, those platforms look for Open Graph and Twitter card tags to build the preview. The essentials are og:title, og:description, og:image, og:url, and og:type, plus twitter:card (usually set to summary_large_image) and twitter:image.
A few common pitfalls:
- Your og:image should be an absolute URL (starting with https), not a relative path, and ideally 1200×630 pixels.
- Missing og:url or og:image is the usual reason a shared link shows no preview card.
Meta Tag & Robots.txt Studio renders a live social card preview as you type, so you can confirm the image, title, and description look right before posting anywhere.
Write a robots.txt that won't block you
Your robots.txt lives at the root of your domain (yoursite.com/robots.txt) and tells crawlers which paths they may or may not visit. A safe, open default allows all bots and points to your sitemap. Use Disallow lines to keep crawlers out of admin or cart paths.
The single most expensive mistake is shipping a Disallow that blocks your whole site — a leftover from staging. The studio lets you compose allow and disallow rules and add a sitemap reference, then copy a clean file.
Put it together
- Open the Meta Tag & Robots.txt Studio and enter your title, description, URL, and image.
- Check the SERP and social previews for truncation or a missing card image.
- Copy the head tags into each page's head, and save the robots.txt at your domain root.
Everything runs locally in your browser — your draft titles, URLs, and unpublished pages are never uploaded. Generate your tags now with the Meta Tag & Robots.txt Studio.