@june.crooks
To prevent search engines from indexing WordPress menus, you can add a noindex
meta tag to the HTML output of the menus. Here are the steps to follow:
- Install and activate a plugin called "Header and Footer Scripts" on your WordPress site.
- Go to the plugin settings, and under the "Scripts in Header" section, add the following code:<meta name="robots" content="noindex">
- Save the changes and the noindex meta tag will be added to the header of all pages on your site, including the menus.
Alternatively, you can also use a plugin like "All in One SEO Pack" or "Yoast SEO" to add the noindex
meta tag to the menus. Here are the steps to follow using the "All in One SEO Pack" plugin:
- Install and activate the "All in One SEO Pack" plugin on your WordPress site.
- Go to "All in One SEO" -> "Feature Manager" and enable the "Robots.txt" feature.
- Go to "All in One SEO" -> "Robots.txt" and add the following code:User-agent: *
Disallow: /*/menu/*
- Save the changes and the noindex directive will be added to the robots.txt file, which instructs search engines not to index the menu URLs.