Viewport meta tag is present

high

viewport_meta

Checks that the viewport meta tag is present.

What does this rule check?

The viewport meta tag controls how the page is displayed on mobile devices. Without it, mobile browsers render the page at desktop width and scale it down.

Why is this important?

Without a viewport tag, pages display incorrectly on mobile. Google's mobile-first indexing penalizes pages without proper mobile configuration.

How to fix

Add a viewport meta tag to the <head> section.

Examples

Incorrect
<head>
  <!-- No viewport meta tag -->
</head>
Correct
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

Agent fix snippet

Copy this snippet and paste it into your AI coding agent to fix this issue automatically.

Add viewport meta tag:

<meta name="viewport" content="width=device-width, initial-scale=1" />