How to fix Viewport not set to device-width
Viewport hardcoded to 980px or similar. Use width=device-width, initial-scale=1.
Estimated impact
Where you'll see this
Detected in
Typical signals
What it looks like (and what it should look like)
Reference snippets for this category. The bad example shows the pattern that triggers the issue; the good example shows the fix in place.
Mobile-hostile markup
<head>
<!-- ❌ no viewport meta — page renders at desktop scale -->
</head>
<body style="width: 1200px;"> <!-- ❌ fixed desktop width -->
<button style="width: 24px; height: 24px;"> <!-- ❌ tap target too small -->
<p style="font-size: 11px;"> <!-- ❌ text too small -->
<div class="interstitial-popup"> <!-- ❌ blocks content -->
</body>
Why this matters
Viewport not set to device-width isn't just a checklist item — when present, it directly affects how search engines and AI assistants understand and rank the page. Sites that consistently resolve high-severity issue outrank competitors who treat it as an afterthought.
Practically, this issue surfaces in three places:
- Crawlers and indexers may skip, throttle, or misinterpret affected URLs.
- Ranking algorithms weight related signals when deciding position.
- AI assistants use these signals as a citation-quality filter when picking sources.
How to detect it on your site
The fastest way to confirm whether viewport not set to device-width is present:
- Run a free atlookup audit — surfaces this and dozens of other issues automatically across all pages, with each finding traced to a measurable signal.
- Cross-reference with Google Search Console for any related coverage warnings.
- For per-page deep dives, run Lighthouse on representative URLs.
60-second page-by-page report. Every issue from this library, scored and prioritized.
Start free auditCommon causes
- Configuration drift — a setting that was once correct silently broke during a deploy, theme update, or plugin install.
- Template-level bug — every page sharing the template inherits the issue. Fix the template once, fix every affected page.
- Third-party interference — a CDN, plugin, or external service introduces the problem after every cache flush.
- Migration leftover — old configuration or stale internal links from a prior site move never fully cleaned up.
Step-by-step fix
Apply these in order. Most are 5-30 minutes each and resolve the most common cause first.
Confirm the scope
Run a full crawl. Note exactly how many URLs are affected and which templates they belong to. Fix the template, not the symptoms.
Inspect the cause
Compare an affected page's source to a healthy page's. The diff almost always points directly at the cause.
Apply the template-level fix
Mirror the "Good" snippet above. Make the change in the source/template, not on individual pages.
Clear caches
Page cache, CDN cache, browser cache. Most "the fix didn't work" reports are actually "the fix is cached behind a stale layer."
Re-crawl and verify
Run another audit. Confirm the affected URL count drops to zero (or close). If it doesn't, you're seeing a different cause — go back to Step 2.
Verification checklist
- Re-crawl shows zero affected URLs (was > 0)
- Search Console coverage report clears any related warnings within 30 days
- Spot-check two representative URLs in browser DevTools / View Source
- Confirm fix survives the next deploy (no plugin/theme reverts it)
- Document the fix in your codebase or runbook for future reference
Preventing it from coming back
- Add a CI/CD audit step that crawls staging before every deploy.
- Monitor weekly via automated re-crawls so issues surface in days, not quarters.
- Document the fix in the template/config so the next dev doesn't undo it during routine work.
Frequently Asked Questions
How long does it take to fix viewport not set to device-width?
Most fixes for viewport not set to device-width take 30 minutes to 2 hours when the cause is template-level. Sites with multiple cascading causes can take half a day. Re-crawl verification adds another hour.
Will fixing this affect my rankings?
If viewport not set to device-width is hurting crawlability, indexability, or Core Web Vitals — yes, often within 2-6 weeks. Lower-impact issues see slower, smaller gains, but they compound when fixed alongside other issues.
Can I fix viewport not set to device-width without a developer?
Some fixes work via the CMS admin. Template-level or server-config fixes typically need developer access. Identify the exact cause first; the right fix path follows.
How do I know viewport not set to device-width is fully resolved?
Three signals: re-crawl shows zero affected URLs, Search Console clears any related warnings within 30 days, and any related performance metrics improve in CrUX field data.
Can viewport not set to device-width cause a manual penalty?
Rarely on its own. Persistent issues combined with other quality signals can contribute to algorithmic suppression. Fix as soon as you spot it.