Meta Tags for WordPress
WordPress doesn’t include a meta description field, and pasting tags into your theme often creates duplicates. Fill in your page details and get the exact values for Yoast SEO or Rank Math.
Upload it to the Media Library first, then copy its File URL here. 1200 × 630 is best.
How meta tags work in WordPress
WordPress creates the <title> tag for you from the post title and site name, but it has no built-in meta description or social tags. The standard solution is an SEO plugin, which adds a box under the editor for each post and page.
With Yoast SEO
- Install and activate Yoast SEO (Plugins → Add New).
- Open the post or page and scroll below the editor to the Yoast SEO box (or click the Yoast icon in the top bar).
- In Search appearance, paste the SEO title, slug and meta description from the tool. Yoast’s own preview and colour bar will confirm the length.
- In the Social tab, add the social title, description and image if you want them different from the search versions.
With Rank Math
- Install and activate Rank Math SEO.
- In the editor, click the Rank Math icon (top right), then Edit Snippet.
- Paste the title, permalink and description. Switch to the Social tab for Facebook and X.
Don’t paste tags into header.php
Guides sometimes suggest adding meta tags to your theme’s header.php. That puts the same description on every page and duplicates the plugin’s tags, and theme updates wipe it out. If you need a custom tag (for example a verification code), use a plugin such as WPCode’s “Header” box, or your SEO plugin’s settings, instead.
Templates and variables
Both plugins can fill titles automatically with variables, for example Yoast’s %%title%% %%sep%% %%sitename%%. That’s fine for archives and old posts, but write titles and descriptions by hand for your most important pages: they get more clicks.
How to use the Meta Tags for WordPress
- Fill in your post title, description, URL and share image.
- Open the Yoast / Rank Math tab of the output to see which field each value goes into.
- Paste each value into your SEO plugin box under the WordPress editor and update the post.
Frequently asked questions
Does WordPress add meta descriptions by itself?
No. WordPress outputs the title tag, but you need an SEO plugin such as Yoast SEO or Rank Math for meta descriptions and social tags.
Can I use Yoast and Rank Math together?
No. Two SEO plugins print duplicate tags. Choose one and deactivate the other; both can import each other’s settings.
Should I add meta tags in header.php?
No. Tags in header.php are the same on every page and are lost when the theme updates. Use your SEO plugin’s fields instead.