Skip to content

Technical pillar / check mobile-viewport

Mobile viewport: does the page fit a phone screen?

We read the viewport tag on each page and judge what a phone does with it: whether the phone lays out the page at the width of the screen, and whether people can still zoom. Without a working tag, phones draw the page at desktop width and shrink it, and Google indexes and ranks the mobile version of every page.

By , Founder and CEO, Own The Climb · Last updated

This is how we check it

We check that each page tells phones to fit it to the screen, with a viewport tag in its head.

  • We read the last viewport tag in the HTML, because browsers use the last one.
  • It passes with width=device-width, or with no width and an initial-scale of 1 or more.
  • A missing tag or fixed-width layout normally produces a high finding. When the server varies by browser, a separate phone read can change the result; the full rules explain those cases. If the page fits the screen but blocks zoom, we report a low finding.

Our reasoning behind this

Google indexes and ranks the mobile version of your pages. Without the viewport tag, a phone lays the page out as a desktop page and shrinks it, so text is tiny and your mobile layout never applies.

What a pass and a finding look like in our reports

Each example shows a piece of markup and the finding title our audit uses for it. We explain the example underneath so you can understand the result in your own report.

  • <meta name="viewport" content="width=device-width, initial-scale=1">

    PassMobile viewport declared

    The page fits itself to the phone's screen, so there is nothing here for you to change.

  • <title>Estate planning</title>

    highMissing mobile viewport meta tag

    With no viewport tag, a phone shows a shrunken desktop page.

How we would fix it on your site

  1. Add <meta name="viewport" content="width=device-width, initial-scale=1"> inside the head of every page template, once.
  2. Leave out user-scalable=no and maximum-scale, so visitors can zoom.
  3. Open the page on a phone to check that text is readable without zooming.

Once your change is live, run the audit again and review the new findings alongside the pages it covered.

How to make the change on your platform

What to do on each platform
PlatformWhat to do
WordPressModern themes print the tag in header.php through wp_head. If yours does not, add it in the theme header or with a header code plugin.
ShopifyShopify themes include it in layout/theme.liquid. Check that a theme customization did not remove it.
Squarespace and WixBoth add a viewport tag to every page for you. If the finding appears, check for custom code added to the site header that writes a second tag.
Next.jsThe App Router adds width=device-width, initial-scale=1 by default. Use the viewport export to change these values.

What we want you to review

  • Include the viewport tag when a custom theme or landing-page template omits it.
  • Use a device-width viewport; a fixed value such as width=1024 can shrink a desktop layout onto a phone.
  • Allow users to zoom by avoiding user-scalable=no and restrictive maximum-scale settings. MDN points to the accessibility requirement to support at least 2x zoom.
  • Remove conflicting viewport tags when both the theme and a plugin add them.

The exact rules our audit applies

We wrote this part for your developer or your SEO specialist. It sets out the inputs, scoring rules and confidence limits we publish for this check, together with the full explanation of how we would fix a finding.

The inputs we describe for this check

The last <meta name="viewport"> tag in the HTML your server sends (browsers apply the last one when a theme and a plugin each write one), quoted in the evidence with our verdict.

A phone fits the page to the screen when the tag says width=device-width, or when it gives no width and an initial-scale of 1 or more: we measured both in Chromium on a 390 pixel phone, and both lay the page out at 390 pixels.

The check fails, as a layout problem, when there is no tag, when the tag sets a fixed width in pixels, or when it sets neither width=device-width nor an initial-scale of at least 1 (an initial-scale of 0.5 laid the page out at 780 pixels; a tag with only minimum-scale at 980). It fails, as a zoom problem, when the page fits but the tag says user-scalable=no (or 0) or sets a maximum-scale under 2. Letter case does not matter, and pairs may be separated by commas, semicolons or spaces, as browsers read them.

We do not resize the page or test its layout beyond the tag.

Our full reasoning

Google says "Google uses the mobile version of a site's content, crawled with the smartphone agent, for indexing and ranking", and recommends responsive web design. The viewport tag is what makes a responsive design work on a phone.

MDN explains that without it a mobile browser may lay the page out in a virtual viewport of 980 pixels and shrink it to fit the screen, so the media queries that would have laid it out for a phone "will never be used". Visitors then pinch and zoom to read, and Google reads the mobile version that they see.

Google retired its Mobile-Friendly Test and Mobile Usability report on 2023-12-01, so this check and Lighthouse in Chrome DevTools are now the quick ways to catch a missing tag. Chrome's own insight, Optimize viewport for mobile, lists two criteria for a viewport optimized for mobile: a width (device-width is most common) and an initial-scale of 1 or more.

Zoom is the other half: WCAG 2.2 success criterion 1.4.4 asks that text can be resized up to 200 percent, and the axe-core rule meta-viewport, which accessibility audits use, fails user-scalable=no and a maximum-scale below 2.

How we score what we find

Measured, on every page we read.

No tag, a fixed width, or a tag that does not fit the page to the screen is a HIGH technical finding, When your server says its answer can depend on the browser (Vary: User-Agent), we judge the homepage phones are sent instead, read once with a phone user agent: it passes if that page fits, and the finding is LOW at low confidence only if we could not read it.

A tag that fits the screen but blocks zooming is a LOW finding: it is an accessibility issue, not a search one, because the page is readable but people with low vision cannot enlarge it, and Google does not use zoom settings for ranking. A tag that fits the screen and allows zoom passes.

How sure we are of each result

HIGH. The tag is quoted from the HTML we received, or from the page phones are sent when your server varies by browser. LOW only when that phone read failed.

A tag added only by JavaScript is not read; phones read the tag in the HTML as the page starts to load, so it belongs there.

How to fix it, in full

Add <meta name="viewport" content="width=device-width, initial-scale=1"> inside the <head> of every page template, once. Leave out user-scalable=no and maximum-scale. Then open the page on a phone, or in Chrome DevTools with the device toolbar on, to check that text is readable without zooming, and re-run the audit.

The sources we rely on

What we have changed on this page

  • · Rewritten in plain words: what we check, why it matters and how to fix it come first, and the full rules sit one click down. We corrected the full rules to describe only what we check today.
  • · When the page we read fails the layout test and your server says its answer can depend on the browser (Vary: User-Agent), we read the homepage once more as a phone, with a phone user agent that carries our crawler name and follows our crawler's robots.txt rules and Crawl-delay, and judge the page phones are sent: if it fits the screen the check passes, if it fails too the finding stays HIGH. Only when that phone read fails is the finding LOW at low confidence. Other pages are not read as a phone: on such a site their phone version is shown as not checked, never graded. en.wikipedia.org declares width=1120 on its desktop pages and sends phones a page that fits; it was reported as a HIGH fixed width.
  • · The check now judges what a phone does with the tag. A tag with only initial-scale=1 passes, because browsers lay that page out at the width of the screen; before, it was reported as a missing viewport. Zoom blocking (user-scalable=no, maximum-scale under 2) is now its own LOW accessibility finding. The last viewport tag is read, as browsers apply it, and space-separated values are read as browsers read them. Initial publication the same day. The finding no longer says Google labels the page "not mobile-friendly": Google retired its Mobile-Friendly Test and Mobile Usability report on 2023-12-01.