How to make a website mobile friendly

Web7 min readBy the UC Tech team
How to make a website mobile friendly

To make a website mobile friendly, add the viewport meta tag, switch to a responsive layout that adapts to any screen width, keep text readable without zooming, make buttons and links large enough to tap, let images shrink to fit, and test on real phones as well as in Chrome DevTools. Google recommends responsive design as the simplest setup to maintain.

It matters for search too. Google uses the mobile version of your pages for indexing and ranking, so what a phone visitor sees is what Google works from. This checklist goes through each fix in order.

Step 1: add the viewport meta tag

Without instructions, mobile browsers assume a page was built for a desktop screen. web.dev explains that they render it at a desktop width, usually about 980 pixels, and then zoom out, so everything looks tiny. One line in the <head> of every page fixes this:

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

This tells the browser to match the page width to the screen and start at normal zoom. Avoid adding maximum-scale, minimum-scale or user-scalable=no. web.dev advises against them because they can stop people zooming in, which many visitors rely on to read small print or check a product photo.

Most modern themes and site builders include this tag. View your page source and search for viewport to be sure.

Step 2: switch to a responsive layout

A responsive layout rearranges itself to fit the screen. Three columns on a laptop become one column on a phone, using the same page and the same URL.

  • Drop fixed widths. A box set to 1,000 pixels wide will force sideways scrolling on a phone. Use percentages, flexbox or CSS grid so columns stretch and shrink.
  • Design for the small screen first, then add a breakpoint (a CSS media query) where the layout starts to look wrong as the screen widens.
  • Base breakpoints on content, not devices. web.dev's guidance is not to define breakpoints by device class. New screen sizes appear every year, but your content tells you where it breaks.
  • Do not hide content just to make it fit. Use accordions or tabs for long sections instead. This also matters for Google, as Step 6 explains.
Quick test: open your site on a phone and scroll. If you can drag the page sideways, something has a fixed width. Tables, embedded maps and wide images are the usual culprits. Wrap wide tables in a container that scrolls on its own.

Step 3: make text easy to read

  • Comfortable size. Visitors should read body text without zooming. Use relative units such as rem or em so text respects the visitor's own settings.
  • Sensible line length. web.dev suggests about 70 to 80 characters per line, around 8 to 10 words. On large screens, limit the width of text columns rather than letting lines run edge to edge.
  • Enough contrast. Light grey text on white is hard to read outdoors on a phone. Our accessibility guide covers contrast and the related WCAG rules.
  • Short paragraphs and clear headings. On a narrow screen, a long paragraph becomes a wall of text.

Step 4: size buttons and links for fingers

A mouse pointer is precise. A thumb is not. Links squeezed together cause mis-taps, which is frustrating on a contact page or checkout. Two published guidelines help:

GuidelineSizeSpacingUse it as
web.dev accessible tap targetsAbout 48 by 48 device-independent pixelsAbout 8 pixels between targetsYour design target for buttons, menu items and icons
WCAG 2.2, criterion 2.5.8 (Level AA)At least 24 by 24 CSS pixelsSmaller targets pass only with enough clear space around themThe minimum to meet, with some exceptions such as links inside a sentence

An icon can look small and still be easy to tap: add padding so the tappable area reaches about 48 pixels. Pay special attention to the menu button, phone and WhatsApp buttons, form fields and the submit button.

Step 5: make images and media fit

  • Let images shrink. Setting max-width: 100% on images stops them spilling off the screen, as web.dev recommends.
  • Give images a width and height. These attributes let the browser reserve space before the image loads, so text does not jump around. That jumping is measured by Cumulative Layout Shift, one of the Core Web Vitals.
  • Do not send desktop-sized files to phones. Serve smaller versions to small screens and compress them. Large images slow pages most on mobile data.
  • Check embeds. Videos, maps and booking widgets often arrive with a fixed width. Make their containers flexible.

Step 6: what Google's mobile-first indexing needs

Google's documentation says it uses the mobile version of a site's content, crawled with its smartphone crawler, for indexing and ranking, and that only content shown on the mobile site is used for indexing. With a responsive site you serve the same HTML to every device, so most of this is handled. If you run separate mobile pages or serve different HTML to phones, check these points from Google's best practices:

  • The same main content and the same headings on mobile and desktop.
  • The same structured data, titles and meta descriptions.
  • The same alt text on images, and good-quality images in supported formats.
  • The same robots meta tags. A stray noindex on the mobile version can stop the page being indexed.
  • No content that loads only after a tap, swipe or typing, because Google will not trigger those actions.
  • No robots.txt rules blocking the CSS, scripts or images your mobile pages need.

Being mobile friendly is part of a good page experience, but Google is clear that no single factor guarantees a ranking.

Step 7: test it properly

Google retired its Mobile-Friendly Test and the Search Console Mobile Usability report on 1 December 2023, so testing now relies on browser tools and real devices.

  1. Chrome DevTools device mode. Open DevTools and click the Toggle device toolbar button. Pick a phone size, rotate it, and use the throttling list to simulate a slower phone and network. Chrome notes this is only a first approximation.
  2. Lighthouse. In DevTools, open the Lighthouse tab and run an audit. Read the performance and accessibility results and fix the items it lists.
  3. Real phones. Test on at least one budget Android phone and one iPhone, on mobile data as well as office Wi-Fi.
  4. Real tasks. Do what customers do: find a service, call you, submit the contact form, add to cart and check out.
  5. Search Console. Watch the Core Web Vitals report for mobile pages after changes go live. Our Search Console setup guide shows where to find it.

If your current site was built for desktop and patching it would take longer than rebuilding, our website redesign checklist covers the rebuild route. For help with either, see our website development service or talk to us.

Testing your site on mobile, from quick checks to real use
  1. Chrome DevTools device modePick a phone size, rotate it and throttle to a slower phone and network.
  2. Lighthouse auditRun it in DevTools and fix the performance and accessibility items it lists.
  3. Real phonesAt least one budget Android phone and one iPhone, on mobile data and office Wi-Fi.
  4. Real tasksFind a service, call you, submit the contact form, add to cart and check out.
  5. Search ConsoleWatch the Core Web Vitals report for mobile pages after changes go live.
Video: Simulate mobile devices with Device Mode #DevToolsTips (Chrome for Developers on YouTube)

Frequently asked questions

Is a separate mobile site (m-dot) still a good idea?

For most businesses, no. Google recommends responsive design as the simplest to maintain, and a separate mobile site means keeping two sets of content, metadata and structured data in step.

Where did Google's Mobile-Friendly Test go?

Google retired the Mobile-Friendly Test and the Mobile Usability report on 1 December 2023. Use Chrome DevTools device mode, Lighthouse and real phones instead.

Will a mobile friendly website rank higher?

Google indexes the mobile version of your pages, so a poor mobile site can hold you back. But mobile friendliness alone does not guarantee rankings. Useful, relevant content matters most.

Does my WordPress theme make my site mobile friendly?

Most current themes are responsive, but plugins, page builders, embeds and wide tables can still break the layout. Test real pages on a phone rather than relying on the theme demo.

Sources

Want this built for your business?

UC Tech builds software, apps, websites and WhatsApp automation.

Start a project