How to Fix a Missing Viewport Meta Tag on Every Page
A page without a viewport meta tag tells mobile browsers to render it at a desktop width of about 980px and then shrink it down, so text is tiny and users have to pinch and zoom. This guide shows how to find every page missing the tag, add the correct tag to your shared templates, remove settings that block zooming, and confirm that each page now passes.

Why it matters
Google indexes the mobile version of your site, so a page that renders as a zoomed-out desktop layout on phones is the version Google evaluates. Missing viewports cause tiny text, tap targets that are too close together and horizontal scrolling. These problems raise bounce rates and hurt mobile Core Web Vitals such as layout shift and interaction responsiveness.
The audit counts how many of your crawled pages lack a valid viewport tag, so a single template that was missed, such as a landing page builder, a 404 page or a legacy blog, can fail the check across hundreds of URLs.
What you need
Step-by-step fix
Group the failing URLs by template
Export the failing URLs from your audit and sort them by path pattern, for example /blog/, /lp/, /products/ or /help/. A missing viewport almost always comes from a template, not from individual pages. You will usually end up with 1-3 templates to fix, such as a landing page builder, a separate blog install or a custom error page.
Confirm what the raw HTML actually contains
Check the server-delivered HTML, not the DevTools Elements panel. A viewport injected later by JavaScript may not be seen by crawlers. Use View Page Source (Ctrl+U / Cmd+Option+U) and search for viewport, or run curl against a sample of URLs.
Note any pages with no tag, two tags, or a tag that has a misspelled name attribute (for example name="view-port").
for u in https://example.com/ https://example.com/blog/post-1 https://example.com/lp/spring-offer; do echo "== $u" curl -sL -A "Mozilla/5.0 (Linux; Android 14) Mobile" "$u" | grep -io '<meta[^>]*name="viewport"[^>]*>' || echo "MISSING" done
Add the tag to the shared <head> template
Open the layout file that every page in the failing group uses and add the tag inside <head>, directly after <meta charset>. Use exactly width=device-width, initial-scale=1. Fixing the template once fixes every page built from it.
<head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Example Co</title> <!-- rest of head --> </head>
Remove duplicates and zoom-blocking values
Search your theme, plugins and tag manager for any other viewport tags. Delete duplicates, because browsers apply only one and the result can be unpredictable. Remove these values if they are present:
user-scalable=nooruser-scalable=0maximum-scale=1(or any value below 5)- a fixed
width=1024or similar pixel width
Blocking zoom fails WCAG 1.4.4 (Resize Text) and is flagged by accessibility and Lighthouse audits.
<!-- Wrong --> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <!-- Right --> <meta name="viewport" content="width=device-width, initial-scale=1">
Cover the outlier templates
Repeat the fix for every template you grouped in step 1. Common places the tag gets missed:
- standalone landing page or funnel builders
- the 404 and 500 error templates
- a blog, docs or help center on a subdomain or a separate CMS
- iframe-free embeds served as full pages, such as booking or careers pages
- legacy static HTML files uploaded years ago
Fix layout breakage the tag exposes
Once the viewport is set, pages built with fixed pixel widths may scroll sideways on phones. Look for elements wider than the screen, such as tables, images and containers with width: 1200px, and make them fluid. Run the snippet below in the DevTools console on a mobile-sized viewport to list the elements that overflow.
[...document.querySelectorAll('*')].filter(el => el.getBoundingClientRect().right > document.documentElement.clientWidth + 1).forEach(el => console.log(el));Clear caches and re-test the results
Purge your page cache and CDN cache, then repeat the curl check from step 2 on several URLs from each template. Open a few pages in Chrome DevTools device mode (Ctrl+Shift+M) and confirm that text is readable without zooming and that there is no horizontal scroll. Finally, re-run the audit and confirm that the count of failing pages is zero.
curl -sL -A "Mozilla/5.0 (Linux; Android 14) Mobile" https://example.com/lp/spring-offer | grep -ic 'name="viewport"' # Expected output: 1
Platform-specific notes
WordPress
Most themes output the viewport in header.php, and block themes get it automatically from WordPress core. SEO plugins such as Yoast and Rank Math do not manage it. If the tag is missing, edit header.php in a child theme (Appearance → Theme File Editor) and add it inside <head>, or use a header-code plugin such as WPCode (Code Snippets → Header & Footer → Header). Page builders that use 'blank canvas' templates sometimes drop it, so test those pages separately.
Shopify
Go to Online Store → Themes → … → Edit code → layout/theme.liquid and confirm the tag sits inside <head>. Also check any alternate layouts, such as layout/password.liquid or custom layouts referenced with {% layout 'name' %}, because each one has its own <head>.
Wix, Squarespace, Webflow
These platforms add a correct viewport tag automatically, and you can't remove it from their templates. If the audit still flags pages, look for a custom code injection (Wix: Settings → Custom Code, Webflow: Site settings → Custom code, Squarespace: Settings → Advanced → Code Injection) that adds a second or zoom-blocking viewport, and delete it.
Next.js
The App Router outputs width=device-width, initial-scale=1 by default. If you customize it, use `export const viewport: Viewport = { width: 'device-width', initialScale: 1 }` in app/layout.tsx and do not set maximumScale or userScalable. Don't put a viewport tag in metadata.other or a manual <head>. In the Pages Router, set it in pages/_app.js via next/head, not in _document.js.
Static sites and Nginx/Apache
The server can't add meta tags for you. The tag has to be in the HTML files or in your static site generator's base layout, such as _layouts/default.html (Jekyll), layouts/_default/baseof.html (Hugo) or src/layouts/Layout.astro (Astro). Rebuild and redeploy after editing.
Check that it worked
✅ How to verify
- Re-run the audit and confirm that no pages are listed as missing a viewport meta tag.
- Run curl with a mobile user agent on sample URLs from every template and confirm exactly one tag containing width=device-width.
- Run Lighthouse in Chrome DevTools in Mobile mode and confirm there is no viewport warning.
- Load the pages in DevTools device mode at 360px wide and confirm the text is readable without zooming and there is no horizontal scrollbar.
⚠️ Common mistakes
- Adding the tag through Google Tag Manager or client-side JavaScript. It arrives after the browser has already laid out the page and may not be seen by crawlers.
- Fixing only the homepage template while landing pages, error pages or a subdomain blog still use a separate head without the tag.
- Including maximum-scale=1 or user-scalable=no, which blocks pinch-to-zoom and creates an accessibility failure.
- Leaving two viewport tags, one from the theme and one from a plugin or code injection, with conflicting values.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
What is the correct viewport meta tag in 2026?
<meta name="viewport" content="width=device-width, initial-scale=1">, placed inside <head>. No other values are needed for a responsive site.
Does a missing viewport tag affect Google rankings?
Indirectly, yes. Google uses mobile-first indexing, so it evaluates the mobile rendering of your pages. Without a viewport the page renders zoomed out with unreadable text, which hurts usability, engagement and mobile page experience signals.
Should I use user-scalable=no to stop the page zooming on input fields?
No. It prevents users with low vision from zooming and fails WCAG 1.4.4. Set form input font-size to 16px or larger, which stops iOS from auto-zooming into fields.
Where did Google's Mobile-Friendly Test go?
Google retired the Mobile-Friendly Test and the Search Console Mobile Usability report in December 2023. Use Lighthouse in Chrome DevTools, the URL Inspection tool's rendered screenshot in Search Console, or a site audit that checks every page.
How to Fix a Missing Call-to-Action Above the Fold
How to Fix Accidental Noindex Tags on Key Pages
How to Add a Table of Contents to Long Pages and Articles
How to Fix Generic Page Titles Like "Home" and "Untitled"
How to Fix Missing Transcripts for Embedded Videos
How to Fix Nofollow on Internal Links (Step-by-Step)