How to fix mobile viewport on Shopify

Confirm your store has a correct responsive viewport meta tag so it displays properly on phones and tablets.

Steps for Shopify

  1. Go to Online Store → Themes in your Shopify Admin.
  2. Click the '...' (Actions) button next to your active theme and select 'Edit code'.
  3. In the Layout folder on the left, click 'theme.liquid'.
  4. Search (Ctrl+F / Cmd+F) for 'viewport'. Most Shopify themes already include the correct tag inside the <head> section.
  5. If missing, add <meta name="viewport" content="width=device-width, initial-scale=1"> on a new line directly after the opening <head> tag.
  6. If it exists but has 'user-scalable=no' or 'maximum-scale=1', remove those values so only 'width=device-width, initial-scale=1' remains.
  7. Click 'Save'. Preview on a mobile device or use Google's Mobile-Friendly Test to verify.
Official Shopify documentation ↗
<meta name="viewport" content="width=device-width, initial-scale=1">

What is mobile viewport?

The viewport meta tag is a single line of HTML code that lives in the `<head>` of every page on your site. It tells mobile browsers how wide to render your page and how to scale it — essentially instructing phones and tablets to show your site at the right size instead of zooming way out and displaying a tiny desktop version. A correct responsive viewport tag looks like `<meta name="viewport" content="width=device-width, initial-scale=1">`. Without it, or with the wrong settings, your site can look broken, tiny, or unresponsive on mobile devices.

Google uses mobile-first indexing, meaning it primarily crawls and ranks your site based on how it looks and works on a mobile device. A missing or broken viewport tag signals to Google that your site is not mobile-friendly, which can directly suppress your rankings in search results. Beyond SEO, over half of all ecommerce traffic now comes from phones — a store that is hard to read or navigate on mobile loses customers at checkout, destroying conversion rates and revenue. Google's own Page Experience signals and Core Web Vitals scores also depend on correct mobile rendering, compounding the ranking impact.

See the complete Mobile viewport guide for every platform and the full background.

Not sure if your Shopify store has this?

Run a free SEOLZ audit — we’ll find mobile viewport and every other issue across your whole site.

Scan my site free

Fix mobile viewport on another platform