A meta description is a short snippet that summarizes the content of a webpage. It appears in search engine results below the page title and can significantly impact click-through rates. This guide explains how to add a meta description using three different methods: directly in HTML, within WordPress, and using the Yoast SEO plugin.
1. How to Add a Meta Description in HTML
If you are building or editing a website using plain HTML, you can manually insert the meta description tag in the <head>
section of your HTML file.
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Example Site</title>
<meta name="description" content="This is an example meta description for my website.">
</head>
<body>
<h1>Welcome to My Website</h1>
</body>
</html>
Best Practices:
- Keep your meta description between 140 and 160 characters.
- Write a compelling summary that encourages users to click on your result in search engines.
- Each page should have a unique meta description relevant to its content.
2. How to Add a Meta Description in WordPress (Without a Plugin)
If you’re not using any SEO plugin in WordPress, you can still add a meta description by editing your theme files directly.
Steps:
- Log into your WordPress dashboard.
- Navigate to Appearance > Theme File Editor.
- Select the
header.php
file from the list of theme files. - Locate the
<head>
section. - Insert the following line within the
<head>
tag:
<meta name="description" content="Custom description for my WordPress site.">
Note:
This method sets a static description for the entire site. For SEO purposes, it is better to have unique descriptions for each page or post, which is why plugins like Yoast SEO are recommended for most users.
3. How to Add a Meta Description Using Yoast SEO (Recommended)
Yoast SEO is one of the most popular SEO plugins for WordPress. It allows you to easily set a custom meta description for each page and post, with real-time feedback on SEO performance.
Steps:
- Install and activate the Yoast SEO plugin:
- In the WordPress dashboard, go to Plugins > Add New.
- Search for “Yoast SEO”.
- Click Install Now and then Activate.
- Open the page or post where you want to add a meta description:
- Go to Pages or Posts and click Edit under the desired item.
- Scroll down to the Yoast SEO meta box.
- Click on “Edit snippet”.
- Enter your meta description in the Meta description field.
- Yoast will display:
- A color-coded bar (green, orange, or red) indicating whether the length is optimal.
- A preview of how the page will appear in search results.
- Click Update or Publish to save the changes.
Advantages:
- Easily customizable per page.
- Visual feedback and suggestions.
- Improves SEO without technical knowledge.
Overview
Method | Best for | Per-page control | Ease of use |
---|---|---|---|
HTML | Static websites | Yes (manually) | Medium |
WordPress without plugin | Simple WordPress sites | No | Easy |
Yoast SEO | WordPress sites | Yes (very easy) | Very easy ✅ |