Viewport Missing Width

No Comments
Viewport missing width
TL;DR: A viewport meta tag without width=device-width tells the browser nothing about how to size the layout on a phone, so mobile users get a zoomed-out desktop page. Add <meta name="viewport" content="width=device-width, initial-scale=1"> and the problem is gone.

Element code HT-018. I have lost count of the sites where this one line was missing and the "mobile problem" everyone was chasing evaporated the moment we added it. The viewport meta tag is the single instruction that connects your responsive CSS to the actual screen. Leave the width out and every media query you wrote is talking to the wrong number.

CODE
HT-018
LAYER
HTML head
IMPACT
Mobile UX + ranking
FIX TIME
Under 5 min
SEVERITY
High

What the viewport tag actually does

Mobile browsers ship with a "layout viewport" that is wider than the physical screen, historically around 980px. This was a hack from the early smartphone era so that old desktop-only sites would render in full and let the user pinch to zoom. When you set width=device-width, you override that fake width and tell the browser to make the layout viewport match the device's own CSS pixel width. That is the number your media queries read. Without it, a @media (max-width:600px) rule never fires on a 390px iPhone, because the browser thinks it is painting onto a 980px canvas.

The initial-scale=1 part sets the zoom level to 1:1 on first paint so the page is not pre-zoomed. The two together are the baseline every responsive site needs.

Before and after

No viewport width width=device-width tiny zoomed out page 980px layout on a phone fits the screen, taps easily

Why this matters for SEO

Google indexes with a mobile-first crawler. The page it evaluates for ranking is the mobile render, and a page that shows a zoomed-out desktop layout on mobile fails the "mobile friendly" bar. In Search Console this surfaces under Page Experience and older Mobile Usability reports as "viewport not set" or "content wider than screen." Beyond the label, the real cost is behavioral: users land, see 8-point text, bounce, and that pogo-sticking feeds back into how the query performs. You are not just missing a checkbox, you are shipping a page nobody can read on the device most of your traffic uses.

Viewport values you will run into

Content valueWhat it doesVerdict
width=device-width, initial-scale=1Matches layout to device, no pre-zoomUse this
initial-scale=1 onlySets zoom but leaves layout width guessingIncomplete
width=1024Forces a fixed desktop width on all devicesAvoid
user-scalable=noBlocks pinch zoom, an accessibility failureDo not add
No viewport tag at allFalls back to the 980px desktop hackThe bug

How to detect it

Run a Screaming Frog crawl and look at the page's head, or add a custom extraction for meta[name=viewport] to flag pages missing the width token across the whole site. Google Search Console Page Experience and the URL Inspection tool will call out viewport issues on real indexed URLs. Sitebulb reports it directly in its mobile hints. For a one-off, open Chrome DevTools, toggle the device toolbar, and view source: if width=device-width is not in the head, you found it. Server-side rendered and templated sites usually have this in one shared layout file, so a single fix can clear thousands of URLs at once.

How to fix it, step by step

  1. Open the shared header or base template that renders inside every page's <head>.
  2. Add <meta name="viewport" content="width=device-width, initial-scale=1"> as high in the head as practical, ideally right after the charset tag.
  3. Do not add maximum-scale or user-scalable=no. Locking zoom breaks accessibility and Google flags it.
  4. Confirm your CSS actually uses relative units and media queries. The tag exposes the correct width, but your layout still has to respond to it.
  5. Redeploy and re-crawl to confirm the tag is present on rendered HTML, not just in a JS bundle that ships late.
DO
  • Ship width=device-width, initial-scale=1 on every page
  • Put the tag in a shared layout so it cannot drift
  • Pair it with real responsive CSS and fluid images
  • Verify on the rendered HTML, not just source
  • Test on an actual mid-range phone, not only DevTools
DON'T
  • Hardcode a fixed pixel width like width=1024
  • Disable zoom with user-scalable=no
  • Rely on JavaScript to inject the tag after load
  • Assume a theme includes it, check every template
  • Set initial-scale above 1 and pre-zoom users in

What good looks like

One viewport tag, present in the rendered head of every URL, reading width=device-width, initial-scale=1, with no scale locks. Search Console shows zero viewport flags, the mobile render matches the desktop content, and text is readable and tappable without pinching. That is the whole target. This is the cheapest high-impact fix in technical SEO, so there is no reason to leave it broken.

FAQ

Does the viewport tag alone make my site responsive?
No. It exposes the correct width to the browser, but your CSS still has to adapt with media queries, flexible grids, and fluid images. The tag is necessary but not sufficient.
Is it OK to set initial-scale without width?
It is incomplete. Without width=device-width the layout viewport can still default to the legacy desktop width, so your media queries may not fire correctly. Always set both.
Why is user-scalable=no a problem?
It stops people from pinch-zooming, which is an accessibility failure for anyone with low vision. Google and accessibility audits both flag it. Leave zoom enabled.
Where exactly should the tag go?
Inside <head>, high up, typically right after the charset meta. It must be in the server-rendered HTML so the browser reads it before layout, not injected late by script.
Want every template checked, not just this one tag?

Viewport misconfigurations usually travel with a stack of other mobile and head-level issues. An audit finds them all in one pass.

Get an Advanced SEO Audit

Claude Vincent is a technical SEO consultant focused on crawlability, rendering, and AI-search visibility. He writes the field guides and case studies at SEO ProCheck, with a bias toward the durable, unglamorous work that decides whether search engines and AI answer engines can actually read and cite a site.

About SEO ProCheck

Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.

Work With Me

Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.

Subscribe to our newsletter!

More from our blog