Blog· HubSpot technical SEO 8 min read

How to Speed Up Your HubSpot Website: A 90+ PageSpeed Checklist

A slow website costs conversions. This technical checklist provides actionable steps to speed up your HubSpot website, from image optimization to script deferral, helping you achieve a 90+ PageSpeed Insights score.

How to Speed Up Your HubSpot Website: A 90+ PageSpeed Checklist — HubStack HubSpot article cover
In this article
  • 1. Audit Your Current Performance with PageSpeed Insights
  • 2. Optimize All Website Images
  • 3. Minimize and Defer Render-Blocking JavaScript
  • 4. Refine CSS Delivery and Remove Unused Styles
  • 5. Leverage HubSpot's Caching and Global CDN
  • 6. Optimize Font Loading and Prevent Layout Shifts
  • 7. Analyze Server Response Time (TTFB)

If you are looking for ways to speed up your HubSpot website, you already know that every millisecond counts. A slow-loading site directly impacts user experience, bounce rates, and ultimately, search engine rankings and lead generation. Google's PageSpeed Insights and Core Web Vitals are not just abstract metrics; they are direct measures of how usable your site is. Achieving a high score is not about vanity—it is about ensuring your marketing asset performs as intended and converts visitors into customers.

Getting a score of 90 or higher on PageSpeed Insights is entirely achievable on the HubSpot CMS, but it requires a deliberate, technical approach. It is not a matter of installing a single plugin or flipping a switch. Performance optimization involves a systematic audit of your site's front-end code, assets, and server requests. You must address how your site loads images, scripts, stylesheets, and fonts to eliminate bottlenecks that frustrate users and search crawlers alike.

This article provides a comprehensive, technical checklist for diagnosing and fixing performance issues on your HubSpot website. We will walk through seven key areas, from initial auditing to advanced asset optimization. Following these steps will give you a clear roadmap to improve your Core Web Vitals, enhance user experience, and hit that 90+ PageSpeed score. For complex issues, a HubSpot technical SEO specialist can provide the necessary expertise.

1. Audit Your Current Performance with PageSpeed Insights

Before making any changes, you need a baseline. Google's PageSpeed Insights is the standard tool for this task. Run your homepage, a key landing page, and a blog post through the tool to get a complete picture. The report provides a performance score from 0-100 and measures your Core Web Vitals: Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS). LCP measures loading performance, INP measures interactivity, and CLS measures visual stability.

Pay close attention to the 'Opportunities' and 'Diagnostics' sections of the report. PageSpeed Insights will explicitly tell you what is slowing your site down. Common culprits include render-blocking resources, improperly sized images, unused JavaScript, and large network payloads. These recommendations are your initial to-do list. For example, an opportunity like 'Eliminate render-blocking resources' points directly to issues with how your CSS and JavaScript files are loaded.

Document your starting scores for both mobile and desktop. Mobile performance is often lower and should be your primary focus, as Google uses mobile-first indexing. Your goal is to see measurable improvements in your LCP, INP, and CLS scores as you work through this checklist. An initial audit prevents you from guessing and allows you to focus your efforts on the changes that will have the most significant impact on your site's speed.

2. Optimize All Website Images

Images are frequently the single largest contributor to page weight. Optimizing them is a critical step to speed up your HubSpot website. Your first rule should be to resize images to their correct display dimensions *before* uploading them to the HubSpot File Manager. If an image will be displayed at 800px wide, do not upload a 4000px version. Relying on browser resizing wastes bandwidth and processing power.

Next, use modern image formats. WebP and AVIF offer superior compression compared to traditional JPEG and PNG formats, resulting in smaller file sizes with little to no loss in quality. HubSpot's CDN automatically converts images to WebP for supported browsers if you append the `?format=webp` query string. You can use HubL filters like `|resize_image_url` to both resize and convert formats dynamically, ensuring the smallest possible file is served.

Finally, enable lazy loading for all below-the-fold images. Lazy loading defers the loading of off-screen images until the user scrolls near them. HubSpot automatically adds `loading="lazy"` to images inserted via rich text modules. For images in custom modules or coded files, ensure this attribute is present in your `<img>` tags. The only exception is your LCP element—usually the hero image—which should load immediately. For a full site build, this is a core part of our HubSpot website design and development process.

Image Format Comparison for HubSpot Websites
FormatBest ForKey Benefit
JPEGPhotographs without transparencyGood compression for complex, colorful images.
PNGImages requiring transparency (logos, icons)Lossless quality and alpha transparency support.
WebPGeneral replacement for JPEG and PNGSuperior compression (25-35% smaller) with transparency.
AVIFHigh-priority images where size is criticalEven better compression than WebP, but with less browser support.
SVGLogos, icons, and simple illustrationsVector-based, resolution-independent, and extremely small file size.

3. Minimize and Defer Render-Blocking JavaScript

When a browser encounters a `<script>` tag in the `<head>` of your HTML, it must pause page rendering to download, parse, and execute the JavaScript. This is known as a render-blocking resource and is a major cause of slow LCP times. HubSpot loads several of its own scripts, and third-party tools for analytics, heatmaps, or advertising add even more. Your goal is to minimize and defer as many of these as possible.

Audit all scripts loading on your site. Use your browser's developer tools (Network tab) or the PageSpeed Insights report to see every JS file. For each one, ask: is it essential for the initial page render? Scripts for chatbots, social sharing, and secondary analytics tracking are almost never essential. These should be deferred. In HubSpot's website settings, you can choose to load scripts in the footer, which is a simple way to defer them.

For more granular control, use the `async` and `defer` attributes on your `<script>` tags. The `defer` attribute tells the browser to download the script in the background and execute it only after the document has finished parsing. The `async` attribute also downloads in the background but will execute as soon as it is downloaded, which can still interrupt rendering. For non-essential scripts, `defer` is almost always the safer choice. Managing these scripts is a common task within our HubSpot support and maintenance plans.

4. Refine CSS Delivery and Remove Unused Styles

Similar to JavaScript, CSS files loaded in the `<head>` are render-blocking. The browser needs the CSS to know how to style the page before it can display it. While HubSpot automatically combines your theme's stylesheets into one or two files to reduce HTTP requests, these files can become bloated over time, especially on older sites or those using complex Marketplace themes. This leads to the 'Remove unused CSS' warning in PageSpeed Insights.

Manually removing unused CSS in HubSpot is challenging. A better approach is to focus on keeping stylesheets lean from the start. During a HubSpot theme customization project, developers should write modular, component-based CSS and avoid large, monolithic files. If you inherit a site with bloated CSS, the most effective solution is often a targeted refactor of the theme's stylesheets rather than trying to use automated purge tools that are difficult to integrate with HubSpot's build process.

Another strategy is to inline critical CSS. Critical CSS is the bare minimum set of styles needed to render the above-the-fold content of the page. By placing this CSS directly in a `<style>` tag in the `<head>`, the browser can render the visible part of the page immediately, improving LCP. The rest of the CSS can then be loaded asynchronously. This is an advanced technique and typically requires a developer to implement correctly using build tools, but it offers significant performance gains.

5. Leverage HubSpot's Caching and Global CDN

HubSpot's infrastructure is built for performance, and it is important to understand the features working for you automatically. All HubSpot-hosted websites are served through a global Content Delivery Network (CDN) powered by Cloudflare. A CDN distributes your assets (images, CSS, JS) to servers around the world, so when a user visits your site, the files are delivered from a server geographically close to them. This dramatically reduces latency and speeds up download times.

HubSpot also manages caching for you. It sets appropriate `cache-control` headers on your assets, instructing the user's browser to store local copies of files. When a user returns to your site, their browser can load the CSS, JavaScript, and images from its local cache instead of re-downloading them, making subsequent page loads nearly instant. You do not need to configure any CDN or caching settings yourself; the key is to ensure your assets are properly hosted within HubSpot's ecosystem.

The main takeaway here is to trust the platform's built-in capabilities. Avoid using external services to 'double up' on caching or CDN delivery for assets hosted in HubSpot, as this can introduce complexity and points of failure. Your focus should be on optimizing the assets themselves—as discussed in the other sections—not on trying to re-engineer the delivery mechanism. Understanding this helps you focus your efforts where they matter most. For companies moving to the platform, we ensure this is handled correctly during a HubSpot website migration.

6. Optimize Font Loading and Prevent Layout Shifts

Web fonts, while great for branding, can negatively impact both LCP and CLS if not handled correctly. When a browser needs a custom font, it may hide the text until the font file is downloaded, causing a Flash of Invisible Text (FOIT). This can delay your LCP if the largest element on the page is text. To fix this, you must use the `font-display: swap;` descriptor in your `@font-face` rule. This tells the browser to display text immediately using a fallback system font, and then 'swap' in the web font once it loads.

This swap can, however, cause Cumulative Layout Shift (CLS) if the fallback font and the web font have different sizes. To mitigate this, use new CSS properties like `size-adjust`, `ascent-override`, and `descent-override` to make your fallback font metrically similar to your web font. This minimizes the jarring 'shift' when the font swaps, satisfying the CLS metric. Tools like the 'Perfect Fallback' generator from Malte Ubl can help you calculate the correct values.

Finally, consider preloading your most critical font files. If you know a specific font variant (e.g., the WOFF2 file for your main heading font) will be needed to render the above-the-fold content, you can add `<link rel="preload">` to your `<head>`. This gives the browser a hint to start downloading that font with high priority, even before it has parsed the CSS that requests it. This can shave hundreds of milliseconds off your LCP time. At HubStack, we prioritize these technical details to ensure client sites are fast from day one.

7. Analyze Server Response Time (TTFB)

Time to First Byte (TTFB) measures how long it takes for a user's browser to receive the first byte of data from your server after making a request. While HubSpot manages the server infrastructure, your site's specific configuration can still impact TTFB. A high TTFB (typically over 600ms) indicates a problem on the server-side, not the front-end. The PageSpeed Insights report will flag a high TTFB under its 'Diagnostics' section.

What causes high TTFB on HubSpot? The most common culprits are overly complex HubL logic, inefficient HubDB queries, or an excessive number of API calls within a custom module. For example, if a page template needs to loop through thousands of HubDB rows or make multiple `hubdb_table_rows` calls without efficient filtering, the server will take longer to generate the HTML for the page. This is server-side processing time that directly adds to your TTFB.

Fixing high TTFB requires a code-level investigation. The solution involves optimizing your HubL and HubDB calls. This could mean adding `|batch` filters to reduce loop iterations, restructuring your HubDB tables for faster lookups, or caching the results of expensive queries. This level of optimization is where an experienced HubSpot developer is essential. If you have optimized your front-end assets and your site is still slow, a high TTFB is the likely cause, and it is time to look at your site's back-end code and data structure.

FAQ

Questions people actually ask AI about this.

What is a good PageSpeed score for a HubSpot website?

A good PageSpeed Insights score is 90 or above. This indicates that your website passes the Core Web Vitals assessment and provides a good user experience. A score between 50 and 89 is considered 'needs improvement', while anything below 50 is 'poor'.

Can HubSpot websites be as fast as WordPress websites?

Yes, absolutely. A well-optimized HubSpot website can be just as fast, if not faster, than a WordPress site. Performance depends on theme quality, image optimization, and script management, not the platform itself. HubSpot's integrated CDN and managed infrastructure provide a strong foundation for speed.

How does HubSpot's CDN help with website speed?

HubSpot uses a global Content Delivery Network (CDN) to host your site's assets. This means files are stored on servers worldwide, and when a user visits your site, the assets are loaded from the server closest to them. This reduces latency and significantly speeds up load times for a global audience.

Does using a HubSpot Marketplace theme slow down my site?

It can. While many Marketplace themes are well-built, some are bloated with excessive features, scripts, and stylesheets to appeal to a broader audience. A custom-built theme tailored to your specific needs is often lighter and faster. Always audit a theme's demo pages with PageSpeed Insights before purchasing.

How do I find which scripts are slowing down my HubSpot site?

Use Google PageSpeed Insights or your browser's Developer Tools (Lighthouse or Network tab). These tools will list all JavaScript files loading on your page and identify which ones are render-blocking or have a long execution time. This helps you pinpoint problematic third-party scripts.

What is lazy loading and how do I enable it in HubSpot?

Lazy loading is a technique that defers the loading of off-screen images until a user scrolls near them. HubSpot automatically applies lazy loading (`loading="lazy"` attribute) to images added through standard rich text modules. For custom modules, your developer must manually add this attribute to the `<img>` tag.

Does HubDB affect my website's speed?

Yes, inefficient HubDB usage can increase your server response time (TTFB). If your page template makes complex queries or loops through thousands of rows without proper filtering, the server takes longer to generate the page. Optimizing your HubL and HubDB calls is key to a low TTFB.

Will removing unused CSS speed up my HubSpot website?

Yes, removing unused CSS reduces file size and can speed up rendering. The browser has less code to download, parse, and apply. While challenging to automate in HubSpot, the best approach is to build with a lean, modular CSS architecture from the start or refactor bloated stylesheets.

How does image compression work in HubSpot?

HubSpot's File Manager does not automatically compress images on upload. However, you can use the `|resize_image_url` HubL filter or append query parameters to the image URL to have HubSpot's CDN resize and serve images in modern, compressed formats like WebP.

Can I host fonts locally on HubSpot to improve speed?

Yes, you can upload font files (like WOFF2) to the HubSpot File Manager and reference them in your CSS. This can be faster than calling the Google Fonts API, as it eliminates an external DNS lookup. Be sure to apply `font-display: swap` to prevent render-blocking.

Proof

What this looks like when it's done right.

Ready to Achieve a 90+ PageSpeed Score?

Related

Technical SEO services

Redirect mapping, metadata baselines, canonical configuration, schema and indexing controls — handled as an ongoing programme rather than a launch-week scramble.

HubSpot technical SEO
Keep reading

How to Set Up HubSpot CRM for a 30-Person Team (Without Overbuilding It)

Most failed CRM rollouts are overbuilt, not underbuilt. Here is the order we configure HubSpot for a 30-person company — and everything we deliberately leave out of version one.

Read article