Table of contents
Get the industry’s fastest hosting for WordPress◦ 100% network uptime
◦ Comprehensive security
◦ 24/7 support

WordPress GuideSEO → Meta Tags

How to add meta tags in WordPress

serp snippet with meta tags labeled

Key takeaways:

If you’re using WordPress, you may come across meta tags when editing or posting to your site. To break it down, meta is an underlying description while tags are customized for all types of content defined in the page’s source code. In simpler terms, meta tags help Google find your site.

When search engines index your website, they collect information from the title, headings, content, and meta tags. Search engines compare the language in each of these sections and rank the website depending on how the information matches.

WordPress doesn’t support meta tags by default, but meta tags can be added manually using theme template files or through WordPress plugins.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

What are WordPress meta tags?

Meta tags are HTML elements that provide information about the contents of a webpage to search engines and browsers that are then displayed in search engine results. When search engines index your website, they collect information from the title, headings, content, and meta tags. Search engines compare the language in each of these sections and rank the website depending on how the information matches.

WordPress doesn’t support meta tags by default, but meta tags can be added manually using theme template files or through WordPress plugins.

Google confirmed in 2009 that it ignores the meta keywords tag entirely, and has separately confirmed that meta descriptions are not used as a ranking signal. Title tags, however, are still a ranking factor. 

And even where meta tags don’t affect rankings directly, they still affect what users see in search results. A well-written meta description can improve your click-through rate, which brings more traffic from the same ranking position.

Let’s look at three ways to add meta tags to WordPress: using an SEO plugin, using a lightweight meta tag plugin, and editing theme files manually.

Which meta tags matter for WordPress SEO

Not every meta tag carries the same weight. Here’s a quick breakdown of the ones worth your attention.

Title tag. The page title shown in search results and browser tabs. Unlike most other meta tags, the title tag is still a Google ranking factor. It’s also the most visible piece of metadata on your site. For best results, use your focus keyword in the page title and keep it under 600 pixels.

Meta description. A brief summary of the page content that appears in search results. Google doesn’t use it as a ranking factor, but a clear, accurate description can make the difference between someone clicking your result or scrolling past it. Keep it under 960 pixels.

Wait, pixels? Yes. You’ll usually read advice about keeping page titles under 60 characters and meta descriptions under 160 characters, and that’s pretty close. The actual limit on the screen, though, is pixels, not characters. 60 Ws takes up a lot more screen space than 60 ls. Use a tool like Mangools’ SERP simulator to make sure your meta tags are actually going to fit.

Robots meta tag. Instructions telling search engines how to handle the page. Use noindex to keep pages like admin dashboards, staging environments, or thank-you pages out of search results. Use nofollow to tell crawlers not to follow outbound links on a page.

Open Graph and Twitter Card tags. These control how your content appears when someone shares a link on Facebook, LinkedIn, or X. Without them, social platforms will pull whatever text and image they find first, which often looks bad. Most SEO plugins generate these automatically.

Canonical tag. Tells search engines which version of a page is the original when duplicate or near-duplicate content exists. Useful if you publish similar content across multiple URLs or run paginated archives.

Method 1: Using an SEO plugin (recommended for most sites)

If you are looking for a quick and easy way to add meta tags to your WordPress website, you can use WordPress plugins

An SEO plugin gives you a per-post, per-page interface for managing meta titles, descriptions, Open Graph data, and robots directives, all without touching code. It may also generate sensible defaults for pages you haven’t manually edited yet.

Here are three plugin options for adding meta tags to WordPress.

Yoast SEO

yoast seo plugin for meta tags

Yoast also handles Open Graph tags, Twitter Card tags, and robots directives. You can configure these under the Social and Advanced tabs in the Yoast meta box.

To set site-wide defaults, go to SEO > Search Appearance in the Yoast settings. This is where you define fallback title and description templates that apply across all posts, pages, or custom post types.

setting meta tags with yoast

Rank Math

seo plugin rank math for meta tags

Rank Math offers more features in its free tier than most competitors, including multiple focus keywords per post, built-in schema markup, and Google Search Console integration.

All in One SEO

aioseo plugin for meta tags

You can find the All in One SEO section under any post or page once you activate the plugin. Fields such as post title, meta description, and focus keyphrase need to be filled out as per your requirements in the All in One SEO (AIO SEO) settings.

All three plugins handle the core meta tag types well. The choice comes down to which interface you prefer and whether you need specific extras like Rank Math’s schema support or Yoast’s readability analysis.

Method 2: Manually editing theme files

This method is best suited for developers or for adding a single static meta tag across an entire site. It gives you full control but requires more care.

Before you start:

Classic theme approach (header.php)

To add meta tags in WordPress without a plugin, you’ll need to open the header.php file. This can be opened using File Manager or a Secure File Transfer Protocol (SFTP) client.

<meta name="description" content="A brief description of your website's content." />
<meta name="robots" content="index, follow" />

Save the file and upload it back to your server. Keep in mind that these tags will apply to every page on your site. They won’t change per post or per page unless you add conditional PHP logic.

Block theme / functions.php approach (wp_head hook)

If your theme doesn’t have a header.php file, or you prefer not to edit it directly, you can hook into wp_head from your child theme’s functions.php:

php

function add_custom_meta_tags() {
    echo '<meta name="description" content="A brief description of your website." />' . "\n";
}
add_action('wp_head', 'add_custom_meta_tags');

This outputs the meta tag in the <head> section of every page, just like editing header.php would.

Conditional tag query for dynamic descriptions

If you want different meta descriptions for single-post views versus your blog index, you can use a conditional query in either header.php or your functions.php hook:

php

<meta name="description" content="<?php if ( is_single() ) {
    single_post_title('', true);
} else {
    bloginfo('name'); echo ' - '; bloginfo('description');
}
?>" />

This shows the post title as the description on individual posts and falls back to the site name and tagline on multi-post views.

How to verify your meta tags are working

Adding meta tags is only half the job. You also need to confirm they’re rendering correctly and that search engines can see them.

View Page Source. Visit any page on your site in a browser and press Ctrl+U (Windows) or Cmd+Option+U (Mac). Search the source code for <meta name="description" or whatever tag you added. If it’s there, it’s working.

Google Search Console. Use Google Search Console (GSC) to see how Google reads and displays your meta information in search results. The URL Inspection tool is especially useful for confirming that Google has picked up recent changes.

Screaming Frog SEO Spider. Screaming Frog can audit meta tags across your entire site. It’s useful for catching missing meta descriptions, titles that are too long, or duplicate meta content that needs fixing.

Social share debuggers. Use Facebook’s Sharing Debugger and X’s Card Validator to confirm that your Open Graph and Twitter Card tags are rendering correctly. These tools show you exactly what image, title, and description will appear when someone shares your link.

SEOquake browser extension. SEOquake provides quick meta tag analysis for individual pages without leaving your browser.

inspecting a meta tag

Common mistakes to avoid

Duplicate meta descriptions. Writing the same description for every page, or running two SEO plugins that both output description tags, creates duplicate meta content. Pick one source of truth for each tag type and stick with it.

Exceeding pixel limits. Remember to keep meta descriptions under 960 pixels and focus on writing compelling summaries that accurately represent your pages. Titles should stay under 600 pixels. Anything longer gets cut off in search results.

Adding meta keyword tags. Google has ignored the keywords meta tag for over 15 years. Including it won’t help and can make your site look like it’s using outdated SEO tactics.

Forgetting robots directives. Pages like admin panels, staging environments, internal search results, and thank-you pages shouldn’t appear in Google. Set noindex on these pages using your SEO plugin’s Advanced tab or a manual robots meta tag.

Not using a child theme for manual edits. If you edit header.php or functions.php in your parent theme directly, the next theme update will wipe your changes. Always work in a child theme.

WordPress meta tag FAQs

Not directly. Google stopped using meta descriptions and meta keywords as ranking signals years ago. But a well-written meta description improves your click-through rate, which brings more traffic to your site from the same ranking position.

Meta descriptions are the summary text that appears under your title in search results. They’re visible to users and affect whether people click. Meta keywords are an old HTML tag that search engines no longer read. Google confirmed in 2009 that it ignores them entirely.

Yes, if you use an SEO plugin. Plugins like Yoast SEO, Rank Math, and All in One SEO all let you set unique titles, descriptions, and other meta tags on a per-post and per-page basis. Manual header.php edits apply the same tags site-wide unless you add conditional PHP logic.

Yes. Block themes still need meta tags, but they may not include a header.php file for you to edit. Use an SEO plugin (the simplest option) or add meta tags through your child theme’s functions.php file using the wp_head hook.

Most SEO plugins handle Open Graph and Twitter Card tags automatically. In Yoast SEO, you can customize the social image, title, and description for each post under the Social tab in the Yoast meta box. If you’re not using an SEO plugin, you can add Open Graph tags manually through functions.php using the same wp_head hook described above.

Additional resources

Easy SEO for WordPress →

A guide to getting started, with 7 simple tasks that anyone can implement

5 best SEO plugins for WordPress →

Did you know that there are also other well viable options on the market as well? SEO Optimization tool Rank Math has built a huge and successful community in a short period.

How to find the best hosting for SEO →

The WP Toolkit includes many valuable features for updates and security

Amanda Valle is Global Director of Organic Search at Liquid Web and a seasoned SEO, user acquisition, digital marketing leader. She has 20+ years of experience in digital marketing, SEO, and content marketing, and holds certifications from SEMrush and Google Analytics. When she’s not driving revenue, she enjoys spending time with her girls.