How to Add Keywords to WordPress? cách chèn từ khóa Keyword tag vào web wordpress

Meta Keywords are a type of meta tag that appears in the HTML code of a web page and are used to help search engines understand the content of a web page. Meta keywords differ from ordinary ones because they exist “behind the scenes” in your page’s source code rather than on the live, viewable page. They appear as follows:

<meta name="keywords" content="keyword1, keyword2" />

The meta tag’s name is keywords, and the value is specified in the content section. In the content section, you should include the keywords you want the page to rank for in search engines.

When choosing or optimizing your meta keywords, the most important thing to remember is that each term should accurately reflect your site’s content. If your website sells kitchen supplies, keyword phrases like “low-rate vehicles” and “find a house in the US” are meaningless.

Google has stopped supporting the keywords meta tag because websites were exploiting it to manipulate search engines and create more organic traffic. This means that Google does not consider the keywords meta tag a web page ranking signal, and using it will not affect your search engine rankings.

Because meta keywords are no longer used by search engines and have no bearing on your organic results, Rank Math excludes the keyword’s meta tag by default. Although Rank Math requires you to provide a focus keyword for each post, this information is only used to analyze your content.

With that stated, you may always use the keywords meta tag if you need it for any reason.

Note: Google does not support meta keywords.

We recommend you install Rank Math, the greatest WordPress SEO plugin. It comes with a full range of features to help you expand your business and allows you to optimize your entire WordPress site for improved SEO.

The plugin must first be installed and activated. To do so, see our step-by-step guide on configuring the Rank Math plugin.

Once you’ve installed and activated Rank Math, use the following filter in your theme’s functions.php or rank-math.php file to allow Rank Math to display the keywords meta tag on your website.

You can create a rank-math.php file in the path /wp-content/themes/theme-name/rank-math.php using FTP or cPanel File Manager.

Within your WordPress admin area, navigate to Appearance > Theme File Editor (for Classic Theme) or Tools > Theme File Editor (for Block Theme) after you’ve created the rank-math.php file.

navigate to theme editor to add keywords to WordPress

Choose rank-math.php from the list of files on the right side of the screen and paste the following code snippet into the code editor.

 * Add <meta name="keywords" content="focus keywords">.
add_filter( 'rank_math/frontend/show_keywords', '__return_true');

After adding the code snippet, click on the Update File button for the changes to reflect.

Add filter in Rank Math

Now, you can check the source code of your posts to see if the meta tag has been added, as shown below.

Meta Keywords

Note: Although Rank Math lets you add any number of keywords to your post, adding too many keywords to the keywords meta tag can do more harm than good. Hence we’d recommend using this meta tag cautiously.

All you have to do to add keywords to an existing or new blog post or a page is open the WordPress post/page editor for the post or page you want to modify.

You’ll be redirected to the regular edit screen for posts in WordPress, where you can use Rank Math in the sidebar in the Gutenberg block editor. You can add your focus keyword in the Focus Keyword section, as shown below.

Add focus keyword

Remember that if a focus keyword is set for the page and the filter is used, the meta keywords tag will be added to the HTML code.

If you’ve set a specific page as your homepage under WordPress Dashboard > Settings > Readings > Your homepage displays, then you can edit the page directly from Rank Math > Titles & Meta > Homepage, as shown below.

edit homepage

When you click Edit Page, you’ll be taken to the usual WordPress page edit screen, where you can use Rank Math in the Gutenberg block editor’s sidebar.

You can then add the keyword in the Focus Keyword section as shown below.

Add keyword to homepage

And that’s it! Keywords will be added to your homepage.

You must create keyword-focused content to optimize your WordPress website for search engines and readers. Rank Math makes it simple to update your site’s keywords in just a few clicks.

If you have any questions on how to add keywords to WordPress, you’re always more than welcome to contact our dedicated support team, who are available 24/7, 365 days a year…

5/5 - (1 bình chọn)