Check 07.07 · Mobile-first and responsive design

Check mobile/desktop content parity

Compare the content served on mobile and desktop (text, headings, images, videos), find what is missing and fix it for your CMS or framework.

Priority
Critical
Difficulty
Intermediate
Estimated time
2 h to 1 day
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

Google indexes the mobile version of pages. Any text, heading, image or video present on desktop but missing from the mobile version is missing from the index. Checking parity means comparing the two versions of each template and fixing the gaps: content hidden on mobile, blocks removed by the theme or page builder, content loaded only on tap, HTML that differs by device. Once the task is done, every template serves the same main content to both versions, possibly collapsed into tabs or accordions on mobile.

Why it matters

Google's documentation on mobile-first indexing is explicit: the mobile site must contain the same content as the desktop site, with the same headings. It warns that a site whose mobile version has less content may lose traffic, since only what appears on the mobile version is indexed. It adds that Google does not load content that requires a user interaction (swiping, clicking, typing) to appear.

Google does, however, accept layouts that save space: its documentation suggests placing content in accordions or tabs rather than removing it. The line is therefore not “visible or collapsed”, but “present in the page or missing”.

There are three configurations:

Configuration Principle Parity risk
Responsive Same HTML and same URL, layout adapted by CSS Content hidden or removed by CSS or JavaScript
Dynamic serving Same URL, different HTML depending on the user agent High: two templates to maintain
Separate URLs m.example.com and www.example.com High: two sites to maintain

Google recommends responsive design, which is simpler to maintain. Other crawlers, including those of AI assistants, do not necessarily receive the same version as Googlebot Smartphone when the site varies by user agent: parity ensures they all read the same information.

What it improves

  • Indexing All the page's content is taken into account, not just its reduced version.
  • Rankings Passages, headings and answers missing from the mobile version cannot make the page rank. This is one of the few direct effects in this family of tasks.
  • Images and videos Only those in the mobile version are taken into account for Google Images and video results.
  • Generative engines Identical content whatever the crawler prevents an answer from relying on a truncated version. Plausible effect, not measured.
  • Experience Mobile visitors find the same information as on desktop.

How to check

1. Identify the configuration

curl -sI -A "Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0 Mobile Safari/537.36" https://example.com/ | grep -i -E "^(location|vary):"

A redirect to m.example.com signals separate URLs; a Vary: User-Agent header signals dynamic serving; neither one usually means responsive design.

2. Compare the HTML served to both agents

This Python script, with no dependencies, records for a URL the number of words, the H1 to H3 headings, the images and the links, on mobile and on desktop (bureau):

# parite.py — usage: python3 parite.py https://example.com/page/
import sys
import urllib.request
from html.parser import HTMLParser

AGENTS = {
    "mobile": "Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0 Mobile Safari/537.36",
    "bureau": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0 Safari/537.36",
}
IGNORES = ("script", "style", "noscript", "template")


class Releve(HTMLParser):
    def __init__(self):
        super().__init__()
        self.mots = 0
        self.titres = []
        self.images = 0
        self.liens = set()
        self.ignore = 0
        self.titre = None

    def handle_starttag(self, tag, attrs):
        attrs = dict(attrs)
        if tag in IGNORES:
            self.ignore += 1
        if tag in ("h1", "h2", "h3"):
            self.titre = [tag, ""]
        if tag == "img":
            self.images += 1
        if tag == "a" and attrs.get("href"):
            self.liens.add(attrs["href"])

    def handle_endtag(self, tag):
        if tag in IGNORES and self.ignore:
            self.ignore -= 1
        if tag in ("h1", "h2", "h3") and self.titre:
            self.titres.append(f"{self.titre[0]}: {' '.join(self.titre[1].split())}")
            self.titre = None

    def handle_data(self, data):
        if self.ignore:
            return
        self.mots += len(data.split())
        if self.titre:
            self.titre[1] += data


releves = {}
for nom, agent in AGENTS.items():
    requete = urllib.request.Request(sys.argv[1], headers={"User-Agent": agent})
    html = urllib.request.urlopen(requete).read().decode("utf-8", "replace")
    releve = Releve()
    releve.feed(html)
    releves[nom] = releve
    print(f"{nom:7} {releve.mots:6} words {len(releve.titres):4} headings {releve.images:4} images {len(releve.liens):5} links")

absents = [titre for titre in releves["bureau"].titres if titre not in releves["mobile"].titres]
print("Headings missing from the mobile version:", absents or "none")

With responsive design, the two lines must be identical. A gap signals dynamic serving, a cache that mixes up the versions, or a theme that adapts its HTML to the device.

3. Compare the rendering

The script reads the raw HTML. JavaScript and CSS can still remove or hide content:

  • Search Console URL Inspection: “Test live URL”, “View tested page”, HTML tab. Search it for a sentence from each important block of the desktop version.
  • Content hidden by CSS: in Chrome's device mode, at a width of 390 px, paste this script into the console, then run it again at desktop width. It lists the text blocks that are not displayed:
(() => {
  const masques = [...document.querySelectorAll('main *, article *')].filter((element) =>
    getComputedStyle(element).display === 'none' && element.textContent.trim().length > 80
  );
  console.table(masques.map((element) => ({
    balise: element.tagName.toLowerCase(),
    classe: String(element.className).slice(0, 40),
    debut: element.textContent.trim().slice(0, 60),
  })));
})();

The table columns give the tag (balise), the class (classe) and the beginning of the text (debut). Closed accordion panels normally appear in the list. A block that only appears on mobile, with no button to open it, is a gap to fix.

  • Visual check: open the page side by side at 390 px and 1280 px, and follow the content block by block.

4. Scale up

Screaming Frog lets you run two crawls of the same URL sample: one with the Googlebot Smartphone user agent, the other with Googlebot Desktop (Configuration > User-Agent), with JavaScript rendering turned on. Export the word count, H1s, H2s and number of internal links from each crawl, then compare them by URL in a spreadsheet.

How to implement

Step 1 — Choose the sample

One URL per template (home page, category, product page, article, service page, local page), plus the twenty pages that generate the most organic traffic. With responsive design, a gap found on a template affects all its pages.

Step 2 — Fill in the parity table

URL Template Desktop words Mobile words Gap Headings missing on mobile Missing images or videos Cause Action
/chaudieres/ Category 1,240 610 −51% H2 “How to choose” None Introduction text hidden below 768 px Replace with an accordion
/the-vert/sencha/ Product page 820 820 0% None Brewing video Video removed from the mobile template Put the video back
/blog/detartrer-chaudiere/ Article 1,900 1,900 0% None None — Compliant
/depannage-lyon/ Local page 650 420 −35% H2 “Service areas” Map Section hidden in the mobile editor Show the section

Gap formula in Google Sheets or Excel, with desktop words in C2 and mobile words in D2: =(D2-C2)/C2, formatted as a percentage.

Decision criterion: a missing heading or missing media is always fixed. For the word count, a gap of a few percent often comes from interface labels (“Menu”, “Close”); above 10%, look for the cause. This threshold is a working convention, not a Google rule.

Step 3 — Apply the fixing rules

Situation on mobile Acceptable? Fix
Content collapsed into an accordion or tabs, present in the HTML Yes None
Text truncated with “Read more”, full text in the HTML Yes None
Block hidden with display: none below a breakpoint, with no way to show it No Accordion, or simplified display
Block missing from the mobile HTML (theme, builder, dynamic serving) No Render the block in both versions
Content loaded only on tap, horizontal swipe or input No Present in the HTML from page load
Smaller images on mobile (srcset), same alt text Yes None
Image or video removed on mobile No Keep it, at an appropriate size

To replace a hidden block with a native accordion, without JavaScript:

<details class="mobile-fold">
  <summary>How to choose your boiler</summary>
  <p>Three criteria matter: the area to heat, the energy available…</p>
</details>

The content of a closed <details> element stays in the HTML and is reachable with a tap. For the presentation and behavior of collapsed content, see also make content accessible without user interaction (opens in a new tab).

Good to know: Google has not documented any specific treatment for text present in the HTML but permanently hidden on mobile, with no button to show it. The safe rule: all main content must be visible, or viewable through a simple interaction, in the mobile version.

WordPress

Versions WordPress 6.4 to 7.1; Elementor 3 and 4, Divi, WP Rocket 3.

  • Page builders: Elementor (Advanced > Responsive > Hide On Mobile in v3, Style > Layout > Display: none per device in v4) and Divi let you hide a block per device. The widespread practice of creating two versions of a section, one for desktop and the other for mobile, doubles the headings in the HTML and often leaves a trimmed-down mobile version. Keep a single section, adapted through its responsive settings.
  • Themes and plugins that test the device: the wp_is_mobile() function changes the HTML depending on the user agent, server-side. Look for it in the theme (grep -rn "wp_is_mobile" wp-content/themes/) and replace the conditional blocks with responsive CSS.
  • Page cache: if the theme or a plugin adapts the HTML to the device, the cache must separate mobile and desktop, otherwise a visitor, or Googlebot Smartphone, receives the other device's version. WP Rocket handles a separate mobile cache, on by default; with Cloudflare APO, turn on caching by device type.

Shopify

Versions Online Store 2.0 themes, Shopify admin, November 2026.

Shopify themes are responsive: the HTML is the same for everyone. Gaps come from section settings specific to some themes (“hide on mobile”), apps that inject content with JavaScript depending on screen width, and product descriptions part of which is locked inside a tab loaded on demand. Check each typical product page with the script from step 2 and URL Inspection.

Wix

Versions Wix Editor and Wix Studio, November 2026.

In the classic Wix Editor, hiding an element from the mobile editor removes it from the mobile page's DOM, according to Wix's developer documentation; the same goes for elements hidden at a breakpoint in Wix Studio. This content therefore does not exist for mobile indexing. Open the mobile editor, “Hidden on Mobile” panel, and show again the useful text, headings, images and videos, even if it means shortening or reorganizing them.

Squarespace

Versions Squarespace 7.1, November 2026.

Sites are responsive, but the section editor lets you set a separate mobile layout. Go through each page in mobile preview and compare it with the desktop version, block by block; code blocks and third-party embeds are the ones most often missing or empty on mobile.

Webflow

Versions Webflow Designer, all plans, November 2026.

Setting Display: None on an element at the “Mobile portrait” breakpoint hides it with CSS: it stays in the published HTML. Keep this setting for decorative or duplicate elements, and turn hidden content blocks into accordions or tabs (Tabs component).

Laravel

Versions Laravel 10 to 13.

Device detection libraries (Agent::isMobile() and equivalents) in Blade templates create dynamic serving. Replace the conditions with responsive CSS. If you must keep a variation by device, add the Vary: User-Agent header and serve the same main content to both versions:

// app/Http/Middleware/VaryByUserAgent.php
namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

class VaryByUserAgent
{
    public function handle(Request $request, Closure $next): Response
    {
        $response = $next($request);

        $response->setVary('User-Agent', false);

        return $response;
    }
}

How the middleware is registered depends on the application's structure.

Laravel 11 to 13

Since Laravel 11, middleware is registered in bootstrap/app.php:

use App\Http\Middleware\VaryByUserAgent;
use Illuminate\Foundation\Configuration\Middleware;

return Application::configure(basePath: dirname(__DIR__))
    // ->withRouting(...)
    ->withMiddleware(function (Middleware $middleware): void {
        $middleware->web(append: [
            VaryByUserAgent::class,
        ]);
    })
    // ->withExceptions(...)
    ->create();

An application upgraded from Laravel 10 without changing its structure can keep its Kernel.php: follow the next tab in that case.

Laravel 10 and earlier

Add the middleware at the end of the web group, in app/Http/Kernel.php:

protected $middlewareGroups = [
    'web' => [
        // … existing middleware
        \App\Http\Middleware\VaryByUserAgent::class,
    ],
];

Next.js

Versions Next.js 15 and 16.

The most common trap: displaying a component depending on screen width in JavaScript (useMediaQuery, window.innerWidth). The server does not know the width; the rendered content then depends on the fallback code, and a block can disappear after hydration. Render both variants and let CSS choose, or better, a single responsive block:

// Avoid: the block does not exist until the width is known
{isDesktop && <Comparatif />}

// Prefer: the block is always rendered, CSS adapts its presentation
<section className="comparatif">
  <Comparatif />
</section>

If the site reads the user agent in the proxy (proxy.ts since Next.js 16, middleware.ts before) or with userAgent() from next/server to serve different pages, add Vary: User-Agent and check parity with the script from step 2.

Nuxt

Versions Nuxt 3 and 4; @nuxtjs/device module 3 and 4.

The @nuxtjs/device module exposes $device.isMobile server-side: using it in a v-if creates dynamic serving. Prefer v-show combined with CSS classes, or a single responsive layout. The same rule applies to a v-if tied to the window width.

Nginx

Versions Nginx 1.18 and later.

With dynamic serving, the Vary header tells caches and crawlers that the response depends on the device:

add_header Vary "User-Agent" always;

For separate URLs, each desktop page declares its mobile version, and each mobile page points to the desktop page as canonical, according to Google's documentation:

<!-- On https://example.com/chaudieres/ -->
<link rel="canonical" href="https://example.com/chaudieres/">
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.example.com/chaudieres/">

<!-- On https://m.example.com/chaudieres/ -->
<link rel="canonical" href="https://example.com/chaudieres/">

In both cases, the lasting solution is migrating to a responsive site.

Apache

Versions Apache 2.4.

With dynamic serving, in the virtual host or .htaccess (mod_headers required):

<IfModule mod_headers.c>
    Header append Vary User-Agent
</IfModule>

For separate URLs, apply the canonical and alternate annotations from the Nginx section.

Cloudflare

Versions Cloudflare dashboard and APO, all plans, November 2026.

If the HTML varies by device, Cloudflare's cache needs to know. With Automatic Platform Optimization (APO) for WordPress, turn on the cache by device type option in the APO settings. For an HTML cache configured with a cache rule, do not cache the HTML of a site using dynamic serving without a cache key that distinguishes the device, otherwise Googlebot Smartphone may receive the desktop version, or the other way around.

Common mistakes

  • Removing text on mobile “to lighten the page”: it disappears from the index. Collapse it instead.
  • Two sections per device in a page builder: duplicate headings in the HTML, and a mobile version that is often incomplete.
  • Elements hidden in the Wix mobile editor: removed from the DOM, and therefore missing from mobile indexing.
  • Conditional rendering based on screen width in JavaScript: the block does not exist in the initial HTML.
  • Content loaded on tap (a “See more” button that calls an API): Google does not trigger this interaction.
  • A cache that mixes up the versions: a site using dynamic serving without a cache separated by device serves the wrong version.
  • Forgetting media: a video or gallery removed from the mobile template.
  • Checking only the home page: gaps hide in category and product page templates.

Frequently asked questions

Does Google take into account content hidden in an accordion on mobile?

Yes, if the content is present in the page's HTML. Google's documentation on mobile-first indexing even suggests placing content in accordions or tabs on mobile rather than removing it. What causes problems is content missing from the mobile HTML or loaded only after a tap, because Google does not trigger these interactions to load content.

Can you show less text on mobile than on desktop?

Only by collapsing it, not by removing it. Google indexes the mobile version of pages and warns that a site whose mobile version has less content may lose traffic. Keep the same text, the same headings, images and videos, and save space with accordions, tabs or “Read more” truncation whose full text stays in the HTML.

How do you compare the mobile and desktop versions of a page?

Download the page with a mobile user agent and then a desktop one, and compare the number of words, the headings, the images and the links. Then check the rendering with Search Console URL Inspection, which shows the HTML seen by Googlebot Smartphone, and find the blocks hidden with CSS on mobile in the browser console. At site scale, Screaming Frog lets you run two crawls with different agents.

Is hiding a block on mobile in Elementor or Wix a problem?

It depends on the tool. In Elementor, hiding per device is done with CSS: the block stays in the HTML, but the practice of duplicating sections for desktop and mobile duplicates headings and often trims the mobile version. In the Wix mobile editor, hiding an element removes it from the mobile page's DOM: that content no longer exists for Google's mobile indexing.

Updated on

Topic checklist (PDF)

And now?

In the “Mobile-first and responsive design” topic

  1. Check responsive layout on smartphones and tablets
  2. Check the viewport meta tag
  3. Eliminate unintended horizontal scrolling
  4. Ensure legible text size
  5. Size tap targets appropriately
  6. Optimize mobile menus
  7. Check mobile/desktop content parity
  8. Check metadata parity
  9. Check structured data parity
  10. Check internal linking parity
  11. Avoid intrusive interstitials
  12. Test mobile forms and conversions
  13. Test Googlebot Smartphone rendering