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
- 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.
- 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.
- 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.
- 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.
- Viewport Meta Tag
Essential for responsive design, this tag controls how a web page is displayed on mobile devices.
- Open Graph Tags
These tags control how a page is displayed when shared on social media platforms, improving click-through rates from social channels.
- 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/noindex, follow/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
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.