How can we properly preview a post in Webflow if it is in draft status, considering that the normal preview functionality doesn't show HTML Embeds and publishing the post still includes it in the RSS feed? Has anyone found a solution to this issue?

Published on
September 22, 2023

To properly preview a post in Webflow that is in draft status, considering the limitations of the normal preview functionality, there are a few steps you can follow:

  1. Set up a staging subdomain: Create a subdomain specifically for staging purposes, like staging.yourwebsite.com. This subdomain will be used to preview draft posts without affecting the live website.

  2. Create a draft page: Duplicate the template or page where your posts are displayed. Rename this duplicated page as the "Draft Page" or something similar. This page will be used to preview your draft posts without the need for HTML Embeds.

  3. Add conditionals: On the "Draft Page," add conditionals to display the draft content only when the post is in draft status. This can be done using Webflow CMS collection fields. For example, you can add a conditional statement like {If status is draft, display content}.

  4. Embed the draft page: Once you have set up the "Draft Page" with the necessary conditionals, embed this page within the CMS Editor for your draft posts. This will allow you to preview the content in the correct context without including HTML Embeds.

  5. Hide the draft page from search engines: To ensure that the draft page doesn't get indexed by search engines, you can add a noindex meta tag to the header of the "Draft Page." This will prevent search engines from crawling and indexing the page.

By following these steps, you will be able to preview your draft posts in Webflow without including HTML Embeds and without those posts appearing in the RSS feed. This approach provides a solution to the issue of properly previewing draft status posts in Webflow.

Example conditionals in Webflow CMS:

{% if status == "draft" %}    <!-- Place draft content here -->{% endif %}

Additional Questions:

  1. How can I create a staging subdomain in Webflow for previewing draft posts?
  2. What are conditionals and how can I use them in Webflow CMS to control the display of content?
  3. Is it possible to exclude draft posts from the RSS feed in Webflow?