Is there a way to exclude specific CMS pages from search engines based on a specific parameter, such as a tag, in Webflow?

Published on
September 22, 2023

Yes, there is a way to exclude specific CMS pages from search engines based on a specific parameter, such as a tag, in Webflow. To achieve this, you can use the "noindex" option for these specific CMS pages.

Here's a step-by-step guide on how to exclude specific CMS pages from search engines based on a tag parameter in Webflow:

  1. Login to your Webflow account and open your project.
  2. Navigate to the CMS Collection that contains the pages you want to exclude.
  3. Open the Collection Editor and select the individual CMS pages that you want to exclude from search engines.
  4. In the right-hand sidebar, scroll down to the "SEO" section.
  5. Click on the "Add custom code" link under the "Header Code" field.
  6. In the code editor that appears, enter the following code:
{% if collection-item.tags contains 'YOUR_TAG_NAME' %}<meta name="robots" content="noindex">{% endif %}

Replace 'YOUR_TAG_NAME' with the specific tag that you want to use to exclude the CMS pages. For example, if you want to exclude pages with the tag "noindex", the code would be {% if collection-item.tags contains 'noindex' %}.

  1. Click "Save & Close" to apply the code changes.
  2. Publish your site to make the changes live.

By following these steps, the CMS pages that have the specific tag (e.g., "noindex") will have the <meta name="robots" content="noindex"> tag added to their HTML code. This tag tells search engines not to index the page, effectively excluding it from search engine results.

Please note that it may take some time for search engines to update their index and recognize the changes you made. Additionally, while this method can help exclude specific CMS pages from search engines, it's always a good practice to double-check and verify the exclusion by inspecting the page source or using tools like Google Search Console.