In the Astro vs HubSpot CMS decision, choose HubSpot’s CMS (Content Hub) when your marketing team lives in HubSpot and wants to build and personalise pages without developers, tied directly to the CRM. Choose Astro when developers build the site, you want the fastest pages and full code ownership, and you only need HubSpot for forms, tracking and email. You can keep HubSpot’s CRM and forms on an Astro site, so leaving HubSpot’s CMS doesn’t mean leaving HubSpot.
HubSpot’s CMS is a hosted website platform inside HubSpot, with HubL templates, a drag-and-drop page editor and native CRM connections. Astro is an open-source framework that builds pages into static HTML you host anywhere. This comparison is for teams deciding where their marketing site should live.
Key Takeaways
- HubSpot CMS is built for marketers: page editor, CRM-driven smart content, native forms and reporting in one tool.
- Astro is built for developers: components, Git, any host, and no client JavaScript unless you add it.
- HubSpot forms, the tracking code and chat all work on an Astro site through their embed scripts.
- HubSpot CMS pricing scales with seats and tiers; an Astro site’s hosting is often free.
- Moving off HubSpot CMS means rebuilding templates, but contacts, forms and workflows stay where they are.
Astro vs HubSpot CMS at a glance
| Astro | HubSpot CMS (Content Hub) | |
|---|---|---|
| Type | Open-source web framework | Hosted CMS inside HubSpot |
| Who edits | Developers, or editors via a headless CMS | Marketers in a drag-and-drop editor |
| Templates | .astro components |
HubL templates, modules and themes |
| CRM integration | Through embeds and APIs | Native: forms, contacts, smart content |
| Personalisation | Build it (server routes or client logic) | Smart content rules by list, device, source |
| A/B testing | External tool | Built in on supported tiers |
| Hosting | Any static or Node.js host | Included, HubSpot only |
| Client JavaScript | None by default | HubSpot scripts on every page |
| Code ownership | Full source in your repo | Templates live in your HubSpot portal |
What HubSpot CMS does well
The reason teams pick HubSpot’s CMS is integration. A form on a page creates or updates a contact record, which triggers workflows, lists and lead scoring. Smart content shows different copy to known contacts, lifecycle stages or traffic sources. Page analytics sit next to email and deal reports. Marketers can clone a landing page, change the copy and launch a campaign the same afternoon without a developer.
That loop (page, form, contact, workflow, report) is hard to match with separate tools. If campaign speed for non-technical marketers is the main requirement, it’s a real advantage.
The costs are platform lock-in and price. Templates are written in HubL and only run on HubSpot. Advanced features (smart content, A/B testing, memberships) sit on higher tiers, and editor seats add up as the team grows.
What Astro does better
Astro’s advantages are on the engineering side:
- Speed by default. Pages are pre-built HTML. Astro adds no JavaScript unless a component opts in with a
client:*directive, so the main cost on a page is whatever third-party scripts you add. - Design freedom. No module system to work within. Anything HTML, CSS and JavaScript can do, a component can do.
- Developer workflow. Git branches, pull request previews, TypeScript, component reuse across sites, and tests.
- Hosting cost. Static output runs on Cloudflare Pages, Netlify, Vercel or GitHub Pages, typically on free tiers for marketing traffic. See the static deployment docs.
- Portability. The site is a folder of source files you can move to any host.
For SaaS companies with in-house developers, this is often the better split: engineers own the marketing site in Astro, marketing owns HubSpot for CRM and email.
Keeping HubSpot forms and tracking on an Astro site
You don’t lose HubSpot’s lead capture by moving the site. HubSpot’s form embed and tracking code are plain scripts. In Astro, mark third-party scripts is:inline so Astro leaves them exactly as written:
---
// src/components/HubSpotForm.astro
interface Props {
portalId: string;
formId: string;
region?: string;
}
const { portalId, formId, region = 'na1' } = Astro.props;
const target = `hs-form-${formId}`;
---
<div id={target}></div>
<script is:inline src="https://js.hsforms.net/forms/embed/v2.js"></script>
<script is:inline define:vars={{ portalId, formId, region, target }}>
hbspt.forms.create({ region, portalId, formId, target: `#${target}` });
</script>
Use it on any page:
---
// src/pages/demo.astro
import BaseLayout from '../layouts/BaseLayout.astro';
import HubSpotForm from '../components/HubSpotForm.astro';
---
<BaseLayout title="Book a demo" description="See the product in 20 minutes.">
<h1>Book a demo</h1>
<HubSpotForm portalId="1234567" formId="your-form-guid" />
</BaseLayout>
Add the HubSpot tracking code once in your base layout’s <head> so page views and form submissions attach to contacts. Copy the exact snippet from your HubSpot settings rather than retyping it, since HubSpot updates embed code from time to time. If the site uses Astro’s <ClientRouter /> for view transitions, test that embeds re-initialise after navigation, or skip client-side routing on pages with forms.
Smart content is the piece you can’t carry over as-is. If you rely on it heavily, you’d need server-rendered Astro routes that read the visitor’s context, or keep those specific landing pages on HubSpot.
Cost and maintenance
HubSpot CMS is a recurring subscription that grows with tier and seats, but it includes hosting, CDN, SSL, security and support. Nobody on your team patches anything.
Astro is free. Hosting a static site is free or close to it, and the main cost is developer time to build and maintain the site. Maintenance is light: dependency updates and the occasional framework upgrade. If you already pay for HubSpot’s Marketing Hub, moving only the website layer to Astro can reduce what you spend on CMS tiers while keeping the CRM.
Choose Astro or HubSpot CMS
Choose HubSpot CMS if:
- Marketers build most pages and need to ship campaigns without developers.
- Smart content, A/B tests and CRM-driven personalisation are central to your strategy.
- You want one vendor for site, CRM, email and reporting.
- You don’t have developers who’d own a codebase.
Choose Astro if:
- Developers own the website and want Git, components and code review.
- Performance and design freedom matter more than in-editor page building.
- You want the site to be portable and cheap to host.
- HubSpot’s role is CRM, forms and email, not page hosting.
A mixed setup also works: the main site in Astro, plus a few campaign landing pages on HubSpot when marketers need to launch without a deploy.
If you’d rather not build an Astro marketing site from a blank project, the Technology category has SaaS and product themes with pricing, features and customer pages already laid out. For how Astro compares with another popular marketing-site option, see Astro vs Webflow.
Moving from HubSpot CMS to Astro
- Export what you can. HubSpot lets you export blog posts and page content; templates written in HubL have to be rebuilt as Astro components.
- List forms and embeds. Note each form’s ID so you can embed the same forms in Astro, keeping their submissions and workflows intact.
- Rebuild templates as components. Header, footer, hero, feature grid, pricing and blog layouts.
- Move blog content. Convert posts to Markdown in a content collection, or keep the blog on HubSpot at a subdomain if editors depend on it.
- Preserve URLs. Match paths, and add redirects for anything that changes.
- Install tracking in the base layout, test forms end to end, then switch DNS.
FAQ
Can I use HubSpot forms with Astro?
Yes. Paste HubSpot’s form embed script into an Astro component with is:inline on the script tags, or wrap it in a component that takes the portal and form IDs as props. Submissions still go to HubSpot contacts and trigger the same workflows.
Is Astro cheaper than HubSpot CMS?
Usually. Astro is free and static hosting is often free, while HubSpot’s CMS is a subscription that grows with tier and seats. Astro shifts the cost to developer time for building and maintaining the site.
Is HubSpot CMS good for SEO?
HubSpot handles the essentials: editable meta tags, sitemaps, SSL, and SEO recommendations in the editor. Astro gives more control over markup, structured data and page weight, which can matter for competitive search terms.
Can Astro do personalisation like HubSpot smart content?
Not out of the box. You can personalise on server-rendered Astro routes using cookies, query parameters or geolocation headers from your host, but there is no built-in link to HubSpot lists. Teams that rely on smart content often keep those pages on HubSpot.
Should a SaaS marketing site use Astro or HubSpot?
If you have developers and want a fast, custom site, Astro with HubSpot forms and tracking is a common choice. If marketers need to build pages themselves every week, HubSpot’s CMS fits that workflow better.