Core Web Vitals: Cumulative Layout Shift – What It Is and How to Improve It for SEO

With Google’s Page Experience update now rolled out, websites that are fine-tuned have some new ranking opportunities.

In particular, websites can qualify for a ranking boost based on several new performance metrics Google calls “core web vitals.”

Core web vitals are a set of core webpage functionalities that impact user experience. They now play a part in strategic SEO and can impact how websites rank in Google.

Google has defined three core web vitals:

  • Largest Contentful Paint (LCP)
  • First Input Delay (FID)
  • Cumulative Layout Shift (CLS)

This article is part of our series about Google’s page experience update, and I’m updating it to reflect Google’s latest changes. Here I’ll discuss cumulative layout shift or CLS:

What Is Cumulative Layout Shift (CLS)?

CLS measures the formatting changes to a webpage after the initial rendering in a browser, usually by the dynamic insertion of content above what is already being shown.

It is generally annoying to be clicking on a link and have that link “move,” resulting in a click to an unexpected location. This kind of instability of content on a webpage creates a bad user experience.

Google discusses CLS here:

Cumulative Layout Shift (CLS) is an important, user-centric metric for measuring visual stability because it helps quantify how often users experience unexpected layout shifts—a low CLS helps ensure that the page is delightful.

Unexpected page layout shifts hurt the user experience. One example is when a button or link shifts on the webpage, causing a person to click something else. This can be really bad if it means they accidentally made a purchase, as you can see in this demo from Google:

Importantly, Google clarifies that not all layout shifts are considered bad:

A layout shift is only bad if the user isn’t expecting it. On the other hand, layout shifts that occur in response to user interactions (clicking a link, pressing a button, typing in a search box and similar) are generally fine, as long as the shift occurs close enough to the interaction that the relationship is clear to the user.

Layout shifts that occur within 500 milliseconds of user input will have the hadRecentInput flag set so that they can be excluded from calculations.

How Is Cumulative Layout Shift (CLS) Measured?

CLS is measured by the total of all individual layout shift scores for every unexpected layout shift that occurs during a pageview’s worst “session window.”

A session window is any 5-second span of shifts that occur while a user visits a page. Google looks for the 5-second interval that has the most shift penalties, and that’s the score for that pageview.

To calculate a layout shift score, Google multiplies the impact fraction and the distance fraction. I’ll break these down.

Impact fraction is how much viewport area an unstable element takes up between two frames.

In the example below, you can see that the element takes up 50% of the original viewport, but then is moved down by 25%. Between both frames, the element takes up 50% plus 25% of the viewport, causing the impact fraction to be 75%.

Example CLS layout shift in viewport.
Example of layout shift between two frames, Google Developers

Distance fraction is the distance that an unstable element has moved. The example below shows that the element has moved 25% of the viewport height.

Example CLS distance shift.
Example of distance shift in the viewport, Google Developers

So to sum up: CLS is measured by the layout shift score, which is calculated this way:

     Impact fraction * distance fraction = layout shift score

Taking the examples above, the calculation would go like so: 0.75 * 0.25 = 0.1875. Google says a webpage should maintain a CLS of less than 0.1 across all pages or page views on your site. This example would be over that goal, so it would score poorly.

One illustration to give you a clearer idea of how CLS is scored: If everything inside of the viewport shifted out of the viewport in a single frame, that would have a layout score of 1.0. (See other examples on GitHub.)

The more elements you have on your page that shift in the viewport, the worse your score could be.

Cumulative Layout Shift target scores.
Google’s CLS score target

You can read more about the layout shift score here and how Google defines its thresholds here.

How Does Cumulative Layout Shift (CLS) Impact SEO?

As with the other core web vitals, CLS helps ensure that the page experience is smooth for your visitors — on both mobile and desktop.

A good layout shift score can help ensure users don’t get frustrated with your webpage, don’t accidentally click and get taken to another page, and don’t mistakenly make a purchase. A good user experience helps you achieve all the outcomes we like to see in SEO: rankings, traffic, conversions and revenue.

According to Screaming Frog research, URLs in Position 1 of the search results were 10% more likely to pass the core web vitals assessment than URLs in Position 9. Of course, this data reflected existing pages — which might not have been fine-tuned to comply with core web vitals yet — before these factors applied to the ranking algorithms.

Looking at CLS, less than half (46%) of mobile URLs and less than half (47%) of desktop URLs had “good” CLS scores. The average CLS score was 0.29 on mobile and 0.25 on desktop. In other words, there is room for CLS improvement on most sites.

Screaming Frog segmented pass rates by position, and found a decline in the percentage of “good” URLs as you move down the positions on the search results page. The following example is mobile results, but they also graphed the data for desktop.

Mobile CLS Classification by Ranking Position data.
“How Many Sites Pass the Core Web Vitals Assessment?” screamingfrog.co.uk

How Do I Improve My Cumulative Layout Shift (CLS) Score?

Google offers lab tools and field tools to help you measure, then optimize your CLS score. For CLS, lab tools may not be as useful as the real data captured in the wild for your webpages.

Tools provided include:

Another way to measure CLS uses the web-vitals JavaScript library. You can learn more about that here.

Common causes of layout shifts include:

  • Images without dimensions
  • Ads, video and other embedded objects or iframes without dimensions
  • Dynamically injected content
  • Late-loading CSS where styles are applied after other items have been loaded
  • Web fonts causing flashes of invisible or unstyled text
  • Elements on the page that wait for other items to be loaded over the network before appearing
  • Animating elements by “height” and “width” instead of CSS’s “transform: scale()”
  • Animating elements by “top”, “right”, “bottom” or “left” instead of CSS’s “transform: translate()”

Basic principles that will improve CLS include:

  1. Always use size attributes for images, videos and other embedded items or iframes. If an element is dynamically loaded, use CSS to style any container elements to the same size or aspect ratio before the content is loaded. Then, when the content is loaded into those container elements, the page will not shift.
  2. Never insert content dynamically above existing content.
  3. If using CSS to animate elements, prefer “transform” animations.

And check out this video about CLS from Google Chrome Developers on YouTube:

Want more in-depth info? Watch our on-demand webinar 3 Expert Tips to Improve Core Web Vitals including the extended Q&A at the end.

Read our entire page experience series for more information on this ranking update:

  1. What’s the Page Experience Update?
  2. How to Make a Mobile-Friendly Site
  3. Intrusive Interstitials & Why They’re Bad for SEO
  4. HTTPS for Users and Ranking
  5. Core Web Vitals Overview
  6. Core Web Vitals: LCP (Largest Contentful Paint)
  7. Core Web Vitals: FID (First Input Delay)
  8. Core Web Vitals: CLS (Cumulative Layout Shift)
E-book on Page Experience update.
Click to get this entire series as a printable e-book.

FAQ: How can I improve my website’s user experience and SEO with Core Web Vitals?

User experience and SEO have become the twin pillars of successful online ventures. Core Web Vitals, introduced by Google, guide websites toward better performance and visibility. These metrics, comprising Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS), quantify crucial aspects of user experience.

LCP gauges loading speed, FID measures interactivity, and CLS evaluates visual stability. Improving these metrics not only ensures a seamless browsing experience but also holds the potential to influence search rankings positively. Users appreciate websites that load swiftly, respond promptly, and maintain visual consistency, ultimately leading to lower bounce rates and prolonged engagement.

To improve Core Web Vitals, consider optimizing your images and videos, leveraging browser caching, and employing content delivery networks (CDNs) for faster loading times. Minimize server response times by employing efficient hosting and coding practices. Moreover, prioritize the rendering of above-the-fold content to prevent layout shifts, enhancing both user satisfaction and SEO performance.

Focus on optimizing server and network performance, using browser caching effectively, and utilizing modern image formats to balance content richness and loading speed. Employ lazy loading for images and scripts to load resources only when users require them, contributing to faster initial page loading and a better overall user experience.

Finally, adopting a mobile-first design approach and leveraging responsive design principles are key strategies for improving Core Web Vitals. With a substantial portion of online traffic originating from mobile devices, catering to mobile users effectively can substantially enhance both user experience and search rankings.

Core Web Vitals offer a strategic advantage to website owners and digital marketers aiming to excel in user experience and SEO. By understanding and optimizing these metrics, websites can provide faster, more interactive, and visually stable experiences that resonate with users and search engines alike. Elevating Core Web Vitals creates a win-win scenario, bolstering website performance and driving organic traffic.

Step-by-Step Procedure to Improve User Experience and SEO with Core Web Vitals:

  1. Assess Current Metrics: Analyze your website’s existing Core Web Vitals metrics using tools like PageSpeed Insights and Google Search Console.
  2. Prioritize Key Metrics: Identify the metric (LCP, FID, or CLS) that requires the most improvement based on your analysis.
  3. Optimize Images and Videos: Compress images and use modern formats to reduce file sizes without compromising quality. Consider lazy loading for images and videos.
  4. Leverage Browser Caching: Configure your server to set appropriate resource caching headers, reducing loading times for returning visitors.
  5. Utilize CDNs: Implement a content delivery network (CDN) to distribute resources across multiple servers, enhancing loading speed.
  6. Optimize Server Response Times: Opt for reliable hosting providers with fast server response times. Minimize server-side processing delays.
  7. Responsive Design: Ensure your website is responsive and provides a seamless experience across various screen sizes and devices.
  8. Mobile-First Approach: Prioritize mobile users by designing your website with a mobile-first mindset.
  9. Efficient Coding: Optimize your code by minimizing unnecessary scripts and stylesheets. Use browser caching for code files.
  10. Minimize Third-Party Scripts: Limit the use of third-party scripts that might impact page loading and interactivity.
  11. Critical Rendering Path: Prioritize rendering of above-the-fold content to prevent layout shifts during page loading.
  12. Reduce Server Requests: Minimize the number of server requests by combining CSS and JavaScript files when possible.
  13. Content Delivery Networks: Utilize CDNs to distribute content across various servers, reducing latency and improving loading speed.
  14. Eliminate Render-Blocking Resources: Identify and eliminate resources that prevent the initial rendering of the page.
  15. Implement Lazy Loading: Use lazy loading to load images and resources only when users scroll to them, improving initial page loading.
  16. Use Responsive Images: Employ responsive images that adapt to the user’s device and screen size, optimizing visual appeal and loading speed.
  17. Continuous Monitoring: Regularly monitor and analyze your website’s Core Web Vitals metrics, making necessary adjustments.
  18. Regular Updates: Keep your website and its components updated to benefit from performance enhancements.
  19. Testing and Iteration: Test different strategies and continually iterate to find the optimal combination for improving Core Web Vitals.
  20. Measure and Adjust: Monitor your optimizations’ impact on user experience and SEO rankings. Adjust your strategies based on results.

Bruce Clay is founder and president of Bruce Clay Inc., a global digital marketing firm providing search engine optimization, pay-per-click, social media marketing, SEO-friendly web architecture, and SEO tools and education. Connect with him on LinkedIn or through the BruceClay.com website.

See Bruce's author page for links to connect on social media.

Comments (31)
Still on the hunt for actionable tips and insights? Each of these recent SEO posts is better than the last!
Bruce Clay on April 3, 2024
How Can I Improve My Website Rankings Through SEO?
Bruce Clay on April 2, 2024
What Is SEO?
Bruce Clay on March 28, 2024
Google’s Explosive March Updates: What I Think

31 Replies to “Core Web Vitals: Cumulative Layout Shift – What It Is and How to Improve It for SEO”

Thanks for the great article, i tried the method you shared in this article, its really works for me.

I understand that SEO is very important factor what you talked about!

The article is very useful,
thank you

Thanks for updating us about the new page experience google update, and I always follow your blog to stay updated. Keep blogging for new updates.

Great article, Bruce Clay’s recent articles covering Page Experience and SEO has been absolute class. Thanks for sharing.

This is very well connected to a professional SEO specialist.

The core web vitals go very smoothly

You have cleared all my doubts about core vitals. Thanks for sharing this amazing blog with us.

Thanks for writing a brief article on core web vitals. I am looking for such a kind of explanation for a long time. Because a newbie blogger understands such kind of blogs easily. Keep writing!

Your post does a great job of simplifying the CLS. You provide excellent advice on how to improve and fix the problems with my CLS blog.

Very helpful content for website and speed optimization. CWV is very important for seo and website ranking.

Core Web Vitals is a recent Google update. This article is most helpful.

I missed the last webinar but reading this blog will help me fix my website speed. When is the next webinar and if you could share webinar recordings with us?

Robert Stefanski

Hi Surendra, our next webinar is today at 10am Pacific time! You can register for it now: https://www.seotraining.com/pages/webinar

We’ll let you know when the recording of the webinar is available.

The recording of our last live webinar “The 3 Reasons an SEO Project Fails” is available to watch until tomorrow. You can watch it here: https://www.seotraining.com/pages/webinar-replay

Thanks,

Gaurav Jain

hello
we notice strange thing

When we use adsenses ads then our Google page speed score is is bellow 50 on mobile and bellow 85 on desktop but when we remove adsense then both mobile desktop score is 95+

What we should do? as we can not remove adsense as its our main revenue .

Paula Allen

Gaurav: AdSense uses A TON of JavaScript to render. You can try to load the scripts asyncronously, using the “async” attribute. That will help minimally, but there’s not much else you can do unless you only use text ads.

Google AdSense images may not be optimized, may be set to different display sizes, etc., so there’s nothing you can do about that. If AdSense is the only revenue stream of the site, that’s something you will have to live with.

What our technical staff recommends is to test the site without AdSense and get it as good as it can be; then turn AdSense on.

Hello,
Much obliged to you for clarifying about aggregate format move. You have given some great tips to improve the CLS for a site

We at Unique Submission. We have our ability in each type of Online Assignment Help which Includes Dissertation Writing, Essay Writing, Assignment composing, Research Proposal Writing, Admission essay composing, Coursework composing and many more.

Get The Best Assignment Help From Best Assignment Helpers Online

Thank you for explaining about cumulative layout shift. You have given some good tips to improve the CLS for a website.

First time reading any blog on Bruceclay, Nicely documented content on CLS. This will be very useful for my team.

Paula Allen

Madover: Thanks for the feedback. We intended this whole series to help the industry understand and prepare for Google’s coming Page Experience update. Thank you for reading and letting us know!

I had a hard time understanding CLS. But this post explains it great.

Great series. I was looking for a coverage of the core web vitals. Thanks a lot for sharing.

I do local SEO for my Income Tax business website. I am now working to make my website design more SEO friendly. There are many factors involved with this. I am now unable to request a index on search console because this is down.

Chris
Owner CEL Financial Services
IRS Registered Tax Preparer
Registered bonded California CTEC Tax Preparer
https://incometaxprepfillmore.com/income-tax-santa-paula-ca

Great article, Bruce Clay’s recent articles covering Page Experience and SEO has been absolute class.

Nice Idea, I think its a part of content optimization, required to make it user friendly.

This is a very comprehensive article. I was aware of most of this, but it covered more than I was aware of what is causing me problems. Thank you for sharing!

LEAVE A REPLY

Your email address will not be published. Required fields are marked *



Serving North America based in the Los Angeles Metropolitan Area
Bruce Clay, Inc. | PO Box 1338 | Moorpark CA, 93020
Voice: 1-805-517-1900 | Toll Free: 1-866-517-1900 | Fax: 1-805-517-1919