Blog

How to Add Meta Tags for SEO in WordPress

Last Updated: January 14, 2025

Meta tags play a crucial role in search engine optimisation (SEO) by providing search engines with important information about your website’s content. They help search engines understand what each page is about and influence how your site appears in search results. This comprehensive guide will explain what meta tags are, their types and uses, their importance for SEO, and how to add and check meta tags in WordPress.

What Are Meta Tags?

Meta tags are snippets of HTML code that provide metadata about a web page. They are placed in the <head> section of the webpage and are invisible to visitors but readable by search engines and web crawlers. Meta tags deliver information such as the page description, keywords, author, viewport settings, and more.

Types of Meta Tags and Their Uses

  1. Meta Title Tag
    The title tag defines the title of a web page and appears in search engine results and browser tabs. It is one of the most critical on-page SEO elements.
  2. Meta Description Tag
    This tag provides a brief summary of a page’s content. It appears under the page title in search engine results and influences click-through rates.
  3. Meta Keywords Tag
    Once a standard SEO practice, this tag is now largely ignored by search engines due to keyword stuffing. However, it can still be used for internal organisation.
  4. Robots Meta Tag
    This tag tells search engines whether to index a page and follow its links. For example, noindex prevents a page from being indexed, and nofollow stops links from being followed.
  5. Viewport Meta Tag
    Essential for responsive design, this tag controls how a web page is displayed on mobile devices.
  6. Open Graph Tags
    These tags control how a page is displayed when shared on social media platforms, improving click-through rates from social channels.
  7. Canonical Tag
    The canonical tag prevents duplicate content issues by specifying the preferred version of a web page.

How Important Are Meta Tags for SEO?

Meta tags are fundamental for SEO because they:

  • Improve Click-Through Rates (CTR): Well-crafted title and description tags entice users to click on search results.
  • Enhance Search Engine Understanding: Tags like the title, description, and robots help search engines understand your content better.
  • Control Crawling and Indexing: Robots meta tags give you control over which pages search engines should index.
  • Prevent Duplicate Content: Canonical tags help search engines identify the main version of a page, reducing SEO penalties for duplicate content.
  • Optimise for Social Media: Open Graph tags improve how your content appears when shared, driving traffic from social platforms.

Methods of Adding Meta Tags in WordPress

1. Using SEO Plugins

SEO plugins simplify the process of adding meta tags without needing to edit code.

  • Yoast SEO:
    • Install and Activate: Go to Plugins > Add New, search for Yoast SEO, click Install Now, and then Activate.
    • Configure the Setup Wizard: Navigate to SEO > General and follow the setup wizard to configure the basic SEO settings for your site.
    • Edit Meta Tags for Pages/Posts: Open a page or post in the editor. Scroll down to the Yoast SEO meta box.
    • Enter SEO Title & Meta Description: Click on the SEO tab and input a compelling SEO title and meta description using the provided fields. The plugin offers real-time feedback for optimal length and keyword usage.
    • Configure Robots Meta Tags: Under the Advanced tab, set indexing options with index/noindex and link following options with follow/nofollow for each page.
    • Social Media Meta Tags: Use the Social tab to set custom titles, descriptions, and images for Facebook and Twitter sharing.
    • Analyse and Optimise Content: Use the built-in readability analysis and SEO scoring to refine your content.
  • Rank Math:
    • Install and Activate: Navigate to Plugins > Add New, search for Rank Math, click Install Now, and then Activate.
    • Run the Setup Wizard: Go to Rank Math > Dashboard and follow the setup wizard to integrate with Google services and configure SEO settings.
    • Meta Tags Customisation: Edit any post or page, scroll to the Rank Math meta box. Add your SEO title, meta description, and focus keyword.
    • Advanced Robots Settings: In the Advanced tab, control indexing and crawling behaviour with index/noindexfollow/nofollow, and schema settings.
    • Bulk Editing: Use the Titles & Meta settings under Rank Math > Titles & Meta for site-wide meta tag customisation.
    • Schema Markup: Implement structured data using built-in schema templates for articles, products, and more.
    • Social Media Integration: Optimise how your content appears on social media through dedicated Open Graph and Twitter Card settings.
  • All in One SEO Pack:
    • Install and Activate: Go to Plugins > Add New, search for All in One SEO (AIOSEO), click Install Now, and activate the plugin.
    • Use the Setup Wizard: Launch the setup wizard for automatic configuration tailored to your website type.
    • Edit Meta Tags: Open a post or page and scroll down to the AIOSEO Settings box.
    • SEO Title & Meta Description: Fill in custom SEO titles and meta descriptions with live character count and snippet preview.
    • Robots Settings: Manage indexing and following rules with the Robots Settings tab.
    • Global Meta Settings: Customise default meta tags site-wide via All in One SEO > Search Appearance.
    • Social Media Optimisation: Use the Social Networks module to define how your content appears on Facebook, Twitter, and other platforms.
    • Advanced Tools: Access powerful features like sitemap generation, robots.txt editing, and schema markup for better search visibility.

Note: The following methods hard-code the meta tags, resulting in the same tags appearing on every page of the website, which is not ideal for SEO. In most cases each page on a website will have a separate purpose and will need to be optimised to rank independently in search results.

2. Manually Adding Meta Tags

For those comfortable with coding, meta tags can be manually added to the theme’s header file. However, note that this method hard-codes the meta tags, resulting in the same tags appearing on every page of the website:

  • Go to Appearance > Theme File Editor.
  • Open header.php.
  • Add the desired meta tags between <head> and </head>:<meta name="description" content="Your page description here"> <meta name="robots" content="index, follow">
  • Save changes.

3. Using the Theme Customiser or Header/Footer Scripts

Some themes offer a custom field for header scripts. Like manual coding, this method also applies the same meta tags across all pages:

  • Go to Appearance > Customise > Additional CSS/JS or Header/Footer Scripts.
  • Add custom meta tags in the designated header section.

4. Advanced Custom Fields (ACF) Plugin

For more dynamic meta tag management:

  • Install and activate Advanced Custom Fields (ACF).
  • Create custom fields for meta titles and descriptions.
  • Insert these fields into the theme’s <head> section using PHP:<meta name="description" content="<?php the_field('meta_description'); ?>">

How to Check if Meta Tags Have Been Updated in WordPress

After adding or updating meta tags, it’s essential to verify their implementation:

1. View Page Source

  • 1. View Page Source

For Windows (Chrome/Edge/Firefox):

  • Open your website in the browser.
  • Right-click on the page and select View Page Source.
  • Press Ctrl + F and type the meta tag you want to check, such as <meta name="description">.

For Mac (Chrome/Firefox):

  • Open your website in the browser.
  • Right-click (or Ctrl + Click) and select View Page Source.
  • Press Cmd + F to search for tags like <meta name="description">.

For Safari (Mac):

  • Open Safari and navigate to your website.
  • Enable the Develop menu if it isn’t already: Go to Safari > Preferences > Advanced, then check Show Develop menu in menu bar.
  • Click Develop > Show Page Source.
  • Press Cmd + F to search for the meta tag (e.g., <meta name="description">).

For Chrome (Mac/Windows):

  • Open the website in Chrome.
  • Press Ctrl + U (Windows) or Cmd + Option + U (Mac) to view the source code.
  • Use Ctrl + F (Windows) or Cmd + F (Mac) to search for the desired meta tag.

2. Browser Extensions

  • SEO Meta in 1 Click (Chrome Extension): Displays all meta tags and relevant SEO data.
  • Detailed SEO Extension: Offers insights into meta tags and on-page SEO elements.

3. Online Tools

  • Ahrefs Site Audit
  • SEMrush Site Audit
  • Meta Tag Analyzer Tools (like Small SEO Tools)

4. Google Search Console

  • Submit your updated sitemap via Google Search Console to prompt re-crawling.
  • Use the URL Inspection Tool to check how Google views the page.

Conclusion

Meta tags are a foundational element of SEO, guiding search engines and users. In WordPress, adding meta tags can be straightforward using SEO plugins. Manual coding or custom fields are an option for a quick addition of the same tags across the website, or a more complex solution.

Regularly checking and updating your meta tags ensures your website remains optimised for search engines and attractive to visitors. By implementing effective, optimised meta tags, you can significantly improve your website’s visibility and performance in search results.

Andrew Witts profile image. Director and SEO specialist at Studio 36 Digital

Andrew Witts

Andrew is the founder of Studio 36 Digital and an advanced SEO specialist with over 10 years of experience helping businesses and brands across the UK improve their online visibility. He holds professional certifications in SEO, including the Ahrefs Certification, and has led data-driven strategies that have significantly increased organic traffic and search engine rankings for clients in a wide range of industries.

Is your website actually getting found?

Get practical SEO and digital marketing tips that help your business win more customers from Google - straight to your inbox, no jargon.

By subscribing you agree to receive marketing emails from Studio 36 Digital. Unsubscribe any time. See our Privacy Policy.

Ideal for:

Medium to large ecommerce businesses looking for a bespoke approach, enhanced brand authority, recognition and visibility for competitive markets.

Ideal for:

Growing small ecommerce stores that need a faster shop and clearer product pages, with ongoing improvements that increase product views, add to carts, and completed checkouts each month.

Ideal for:

SMEs and multi location retailers selling across regions, combining helpful category and product content, improved navigation, and reputation building to increase organic traffic, conversions, and repeat customers each month.

Ideal for:

Ambitious SMEs and national brands in competitive categories, publishing buying guides and product content at scale, earning coverage on trusted sites, and driving monthly growth in high intent traffic, basket value, and revenue.

Ideal for:

Medium to large businesses looking for a bespoke approach, enhanced brand authority, recognition and visibility for competitive markets.

Ideal for:

Growing small businesses that need a smoother, faster site and regular improvements, for example salons, studios, and local retailers, targeting more visibility, calls, and form enquiries.

Ideal for:

SMEs and multi location small businesses competing across towns and regions, for example estate agents and regional service providers, using helpful content to increase rankings, leads, and sales.

Ideal for:

Ambitious SMEs and national brands in competitive markets, for example franchise groups and national service providers, publishing content at scale and earning coverage to drive monthly growth in traffic and revenue.