Fix-it guide

Add a viewport meta tag for mobile

The viewport meta tag is a one-liner in the <head> that tells phones "render this page at phone width, not zoomed-out desktop width.

High impact~5 minutesMetadata & tags

What it is

The viewport meta tag is a one-liner in the <head> that tells phones "render this page at phone width, not zoomed-out desktop width." Without it, your homepage looks like a tiny shrunken desktop site on mobile, with tap targets too small to hit.

Why it matters

Google switched to mobile-first indexing years ago, the mobile version of your site IS your site as far as ranking is concerned. A missing viewport tag means Google grades your page as mobile-unfriendly, which directly suppresses rankings. It also costs you conversions: most service-business visitors are on phones.

How to fix it

  1. Add the viewport meta tag

    Paste this into your <head> on every page (or, ideally, in your shared layout/template so it appears everywhere automatically).

    <head>
      <meta name="viewport" content="width=device-width, initial-scale=1" />
    </head>
  2. Do not disable user zoom

    You will sometimes see older code with `user-scalable=no` or `maximum-scale=1`. Do not use those, they break accessibility for low-vision users and Google penalizes them.

  3. Next.js: set it via the viewport export

    In the App Router, export a `viewport` object from your root layout. Next.js will inject the correct tag.

    // app/layout.tsx
    import type { Viewport } from 'next';
    
    export const viewport: Viewport = {
      width: 'device-width',
      initialScale: 1,
    };

How to verify the fix

Open the page on your phone (or Chrome DevTools > Toggle Device Toolbar). The layout should match the design, text readable, buttons big enough to tap. View Page Source and confirm the <meta name="viewport"> tag is present. Re-run the audit.

Further reading

Confirm the fix

Run a fresh audit to make sure the issue is gone.

We’ll re-grade every category and confirm this issue is no longer firing.

Run a fresh audit