How to publish a page in development mode without HubSpot content staging [code snippet]


How to publish a page in development mode without HubSpot content staging [code snippet]

HubSpot has a nice feature called content staging which prevents search engines form crawling and indexing the content. But if you are using HubSpot CMS starter you won’t have access to this tool. So a work around is to add the following code to the HEAD of your base layout HTML file. This adds the meta no-index tag and also adds an ugly alert to the bottom of the page to remind you the tag exists. As you work you can ignore the tag but when you are ready to publish you will remember to remove that tag so Google will be free to crawl and index your site.

<!-- Development Mode -->
<meta name="robots" content="noindex,nofollow,noarchive" />
<script>
window.addEventListener("load", function() {
const newDiv = document.createElement("div");
newDiv.textContent = "Development mode: noindex. When ready to publish, ask Jake Lett to remove this.";
newDiv.style.backgroundColor = "yellow";
newDiv.style.padding = "10px"; // Optional: add some padding for better visibility

// Get the body element
const body = document.body;

// Append the new div as the last child of the body, before the closing body tag
body.appendChild(newDiv);
});
</script>
<!-- End Development Mode -->

About the Author

Jake Lett is a results-driven Detroit based B2B marketing consultant with 15+ years of hands-on experience managing SEO and PPC campaigns across manufacturing, SaaS, and professional services industries. He’s a Certified Google Ads Specialist and HubSpot CMS Developer who has personally managed budgets ranging from $500 to over $10,000/month.

Jake specializes in helping small businesses and solo marketers get more from lean ad budgets—using practical strategies that drive qualified leads, not just traffic. He shares real-world lessons on his blog, YouTube channel, and in his published books on digital marketing.



Related posts

Tags: , , ,

Want to Get Email Updates of New Articles?

Join My Email Newsletter