Get Free Strategy

How to Add Meta Tags in WordPress for SEO

Adding meta tags to WordPress for SEO optimization

Meta tags help search engines understand your content and influence how your pages appear in search results. In WordPress, adding and optimizing meta tags is straightforward with the right approach. This guide covers everything you need to know about implementing effective meta tags.

What Are Meta Tags?

Meta tags are snippets of HTML code that provide information about your web pages to search engines and browsers. They don't appear on the page itself but live in the page's code.

The two most important meta tags for SEO:

Title Tag: Defines the page title shown in search results and browser tabs. While technically not a meta tag (it's a separate HTML element), it functions similarly and is often discussed alongside meta tags.

Meta Description: A brief summary of page content displayed below the title in search results. It doesn't directly affect rankings but significantly impacts click-through rates.

Adding Meta Tags with SEO Plugins

The easiest and most recommended way to add meta tags in WordPress is through an SEO plugin. These plugins add simple fields where you can enter your tags without touching code.

Using Yoast SEO

  1. Install and activate Yoast SEO from Plugins → Add New
  2. Edit any page or post
  3. Scroll down to the "Yoast SEO" meta box
  4. Click "Edit snippet" to modify title and meta description
  5. Enter your optimized title (keep under 60 characters)
  6. Enter your meta description (keep under 155 characters)
  7. The preview shows how it will appear in search results
  8. Update or publish the page

Using Rank Math

  1. Install and activate Rank Math
  2. Edit any page or post
  3. Find the Rank Math meta box in the editor
  4. Click "Edit Snippet"
  5. Enter your title and description
  6. Preview the search appearance
  7. Save your changes

Using All in One SEO

  1. Install and activate AIOSEO
  2. Edit your page or post
  3. Scroll to the AIOSEO Settings section
  4. Enter your title and meta description in the provided fields
  5. Check the snippet preview
  6. Publish or update

Writing Effective Title Tags

Best Practices

  • Length: Keep under 60 characters to avoid truncation in search results
  • Primary keyword: Include your target keyword, preferably near the beginning
  • Brand name: Add your brand at the end when space permits (e.g., "Page Title | Brand Name")
  • Unique: Every page should have a distinct title
  • Compelling: Make it interesting enough to earn clicks

Title Tag Examples

Poor: "Home"

Better: "Austin Plumbing Services | 24/7 Emergency Repairs | ABC Plumbing"

Poor: "Blog Post"

Better: "How to Fix a Leaky Faucet in 5 Easy Steps"

Writing Effective Meta Descriptions

Best Practices

  • Length: 150-155 characters maximum
  • Include keywords: Google bolds matching search terms, catching user attention
  • Action-oriented: Use active language that encourages clicks
  • Accurate: Honestly describe page content—misleading descriptions hurt user experience
  • Unique: Each page needs its own description

Meta Description Examples

Poor: "Welcome to our website. We offer many services. Contact us today."

Better: "Need a plumber in Austin? We offer 24/7 emergency service with upfront pricing. Licensed, insured, and rated 4.9 stars. Call for same-day service."

Setting Default Meta Tag Templates

SEO plugins let you create templates for meta tags, automatically generating them when you don't write custom ones.

In Yoast SEO

  1. Go to SEO → Search Appearance
  2. Select content type (Posts, Pages, etc.)
  3. Edit the "SEO title" and "Meta description" templates
  4. Use variables like %%title%%, %%sitename%%, %%excerpt%%

Common Template Variables

  • %%title%%: The page/post title
  • %%sitename%%: Your site name
  • %%excerpt%%: The post excerpt
  • %%category%%: Primary category
  • %%currentyear%%: Current year

Other Important Meta Tags

Open Graph Tags (Social Media)

Control how your content appears when shared on Facebook, LinkedIn, and other platforms. SEO plugins typically handle these:

  • og:title - Social share title
  • og:description - Social share description
  • og:image - Image displayed in shares

Twitter Cards

Similar to Open Graph but specific to Twitter. Most SEO plugins configure these alongside Open Graph tags.

Robots Meta Tag

Controls search engine behavior:

  • index/noindex: Whether to show the page in search results
  • follow/nofollow: Whether to follow links on the page

SEO plugins provide simple checkboxes for these settings on each page.

Adding Meta Tags Without a Plugin

While plugins are recommended, you can add meta tags manually in your theme:

In Theme header.php

Add meta tags inside the <head> section:

<meta name="description" content="Your page description here">

This approach is inflexible since it applies to all pages. Theme customization is better left to developers.

Using Functions.php

You can hook into wp_head to add dynamic meta tags, but this requires PHP knowledge and is more complex than using a plugin.

Checking Your Meta Tags

View Page Source

  1. Visit your page in a browser
  2. Right-click and select "View Page Source"
  3. Look in the <head> section for your meta tags

Browser Extensions

SEO extensions like SEO Meta in 1 Click or MozBar display meta tags without viewing source code.

Google Search Console

Use the URL Inspection tool to see how Google reads your meta tags.

Common Mistakes to Avoid

  • Duplicate meta descriptions: Every page needs unique descriptions
  • Keyword stuffing: Cramming keywords looks spammy and hurts clicks
  • Too long: Truncated tags look incomplete in search results
  • Missing tags: Not having meta descriptions leaves Google to auto-generate (often poorly)
  • Misleading content: Tags that don't match page content hurt user trust

Quick Reference

Title Tags: Under 60 characters, include keyword, make compelling

Meta Descriptions: Under 155 characters, include keywords, action-oriented

Best Method: Use an SEO plugin (Yoast, Rank Math, or AIOSEO)

Check Tags: View page source or use SEO browser extensions

Properly optimized meta tags improve your visibility in search results and increase the likelihood that searchers click through to your site. Take time to write unique, compelling tags for your most important pages.

Ready to Improve Your SEO?

Get your free SEO strategy and discover how to rank higher in your market.

Get Started