SiteTidy
HomeGuidesThe Ultimate Guide to Meta Tags (Part 7): Mobile, Viewport and Browser Metadata
SEO

The Ultimate Guide to Meta Tags (Part 7): Mobile, Viewport and Browser Metadata

Configure viewport, charset, theme-color and browser-facing metadata correctly without relying on obsolete mobile SEO tricks.

Published on August 15, 2026Updated August 31, 2026
The Ultimate Guide to Meta Tags (Part 7): Mobile, Viewport and Browser Metadata

There was a time when “mobile SEO” meant maintaining a second mobile site, adding a pile of special tags and hoping Google understood the relationship between the two versions.

That is not the web we have now.

For a modern responsive site, the metadata that matters to mobile browsers is surprisingly small. The difficult part is not remembering dozens of tags. It is understanding which tags still have a real job, which are merely presentation hints, and which pieces of old SEO advice should have been retired years ago.

This guide covers the browser-facing metadata that still deserves a place in a production <head> in 2026.

Start with the boring tag that prevents spectacular mistakes

Use UTF-8 and declare it early:

<meta charset="utf-8">

The charset declaration is not an SEO optimisation. It tells the browser how to interpret the document’s bytes.

That distinction matters. If text is decoded incorrectly, the consequences can leak into visible copy, titles, structured data and anything else containing non-ASCII characters.

For normal modern sites, UTF-8 should be the default rather than something you debate page by page.

The viewport tag is still essential

A conventional responsive page should normally contain:

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

Without a suitable viewport declaration, mobile browsers can lay the page out using a wider virtual viewport and then shrink it to fit the physical screen. The result is the familiar “desktop page squeezed onto a phone” effect.

Google’s current documentation explicitly recognises the viewport meta tag and says its presence indicates that a page is mobile friendly.

But the tag does not make a site responsive by itself.

This:

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

plus a fixed 1,200px layout is still a bad mobile experience.

The viewport declaration gives your CSS the correct canvas. Your CSS still has to do the work.

Avoid disabling zoom

You will still encounter examples such as:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

Do not copy that blindly.

Preventing users from zooming can create a serious accessibility problem for people who need magnification. If your interface becomes unusable when somebody zooms it, fix the interface rather than trying to stop the user zooming.

A much healthier default is simply:

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

Then test the site at enlarged text and zoom levels.

theme-color is presentation, not ranking magic

Browsers can use theme-color to colour parts of their surrounding UI:

<meta name="theme-color" content="#ffffff">

You can also provide variants using media queries:

<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#111827" media="(prefers-color-scheme: dark)">

This can make an installed or mobile browsing experience feel more polished.

What it does not do is make the page rank better.

That sounds obvious, but metadata audits often go wrong because every tag in <head> gets treated as “SEO”. Some metadata controls search. Some controls browser presentation. Some provides social previews. Some exists for application behaviour. They should not be judged by the same criteria.

Mobile-friendly is a page property, not a meta-tag collection

A good mobile page needs more than viewport metadata.

Check the things users actually experience:

  • content fits without horizontal scrolling;
  • controls are usable by touch;
  • text remains readable;
  • dialogs do not overflow the viewport;
  • navigation remains operable;
  • images resize correctly;
  • forms work with mobile keyboards;
  • sticky elements do not consume the screen;
  • orientation changes do not destroy the layout.

A perfect <head> cannot compensate for a broken interface.

Use responsive images rather than metadata hacks

Mobile devices often need different image resources, but the solution belongs primarily in HTML rather than obscure meta tags.

For example:

<img
  src="hero-1280.webp"
  srcset="hero-640.webp 640w,
          hero-960.webp 960w,
          hero-1280.webp 1280w"
  sizes="(max-width: 700px) 100vw, 60vw"
  width="1280"
  height="720"
  alt="Dashboard showing a completed website audit">

The browser can then choose an appropriate candidate for the current viewport and device characteristics.

This improves actual delivery rather than merely declaring that the page is intended for mobile.

Do not confuse viewport width with device detection

width=device-width does not tell your server what device is visiting.

It tells the browser how to establish the layout viewport.

That means you should not build business logic around the assumption that the viewport meta tag somehow distinguishes “mobile users” from “desktop users”. Responsive design works precisely because that binary distinction is often unnecessary.

A narrow browser window on a laptop and a similarly sized phone viewport may need the same layout even though the hardware is completely different.

Meta refresh is usually the wrong redirect

HTML supports refresh-style metadata such as:

<meta http-equiv="refresh" content="0; url=/new-page/">

Google recognises meta refresh, but its current documentation recommends a server-side 301 redirect instead when you are actually moving a URL.

That is sensible operational advice too.

A real HTTP redirect:

  • communicates the redirect before HTML parsing;
  • works without waiting for a document to render;
  • expresses URL migration more clearly;
  • is easier to reason about in logs and infrastructure;
  • avoids awkward delayed-refresh experiences.

Use meta refresh only when you genuinely cannot implement an appropriate HTTP redirect and understand the trade-off.

http-equiv is not a replacement for proper HTTP headers

The <meta http-equiv> mechanism can emulate a limited set of HTTP-like behaviour, but that does not mean every security, caching or transport header belongs in HTML.

If a control belongs at the HTTP layer, configure it there whenever possible.

For example, do not build your entire caching strategy around invented or ineffective <meta http-equiv> combinations copied from an old template.

Your CDN, reverse proxy, application and origin response headers are the places to manage HTTP caching properly.

The same general rule applies to security controls: use the mechanisms designed for the job.

Mobile metadata in an Astro layout

For a SiteTidy-style Astro site, the common browser metadata belongs in the shared document layout rather than being retyped into every page:

---
const {
  title,
  description,
  themeColor = '#ffffff'
} = Astro.props;
---

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content={themeColor} />

    <title>{title}</title>
    <meta name="description" content={description} />
  </head>
  <body>
    <slot />
  </body>
</html>

The layout owns the invariant technical metadata. Individual pages supply the metadata that actually changes.

That is much less error-prone than allowing every content page to construct an entire <head> independently.

What is your site actually sending?

Audit the rendered page and its technical signals rather than trusting what the CMS settings screen claims.

Run Free Audit →

Watch for duplicate viewport tags

Framework migrations, CMS plugins and tag-management snippets can accidentally produce more than one viewport declaration.

For example, a base template may contain:

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

while an old plugin injects another declaration with different values.

That is not sophisticated optimisation. It is conflicting configuration.

Treat metadata ownership as an engineering concern. Decide which layer owns each tag and prevent lower layers from silently duplicating it.

Browser metadata should be present in the delivered document

If important metadata only appears after a client-side application boots, you have made a simple concern unnecessarily fragile.

The browser needs charset and viewport information while it is processing the document. Put fundamental document metadata in the HTML response.

Likewise, search and social metadata is generally easier to operate when it is rendered server-side or at build time rather than injected after hydration.

This is one reason static generation and SSR remain such comfortable fits for content-heavy sites: the document arrives with its identity already attached.

Obsolete mobile SEO patterns to remove

A technical audit should actively remove old advice, not merely add new tags beside it.

Be suspicious of:

Keyword metadata

<meta name="keywords" content="mobile, seo, website, best, cheap">

This is not a modern Google ranking strategy.

Handset-specific redirects based on brittle user-agent lists

Responsive design normally removes the need to maintain parallel desktop/mobile experiences.

Viewport settings that disable user control

Accessibility matters more than forcing a design to remain at exactly one scale.

Huge piles of vendor-specific tags with no current consumer

Every tag should have an owner and a purpose. If nobody can explain what consumes it, investigate before perpetuating it for another five years.

A practical browser-metadata baseline

A conventional page might start with something this small:

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>Useful, page-specific title</title>
  <meta name="description" content="A useful description of this particular page.">

  <link rel="canonical" href="https://example.com/page/">

  <meta property="og:title" content="Useful, page-specific title">
  <meta property="og:description" content="A useful social description.">
  <meta property="og:url" content="https://example.com/page/">
  <meta property="og:image" content="https://example.com/social/page.png">

  <meta name="theme-color" content="#ffffff">
</head>

Then add metadata because a real requirement demands it, not because an SEO checklist has 73 empty boxes.

Test the page, not the template

A shared template can be correct while individual routes are broken.

Test representative URLs across:

  1. desktop and mobile layouts;
  2. light and dark browser preferences where relevant;
  3. production HTML source;
  4. client-side navigations;
  5. error pages;
  6. canonical and alternate routes;
  7. pages produced by different CMS/content types.

For responsive behaviour, use real browser testing rather than assuming that a viewport tag proves the page works.

The rule to remember

Mobile metadata is infrastructure for the experience. It is not the experience itself.

Use UTF-8. Set a sane viewport. Keep presentation metadata deliberate. Prefer real HTTP redirects and headers for HTTP concerns. Then spend most of your effort making the actual responsive page fast, readable and usable.

That will do far more for users than collecting obsolete meta tags ever will.

Ready to audit your site?

Put this guide into practice immediately using our free tools.

Browse 180+ Free Tools