Mobile Redirects
Mobile redirects send phone users from a desktop URL to a matching mobile URL, as on m-dot sites. Faulty or sneaky mobile redirects harm users and rankings.
What is Mobile Redirects?
Mobile redirects are server-side or JavaScript redirects that automatically send smartphone visitors from a desktop URL to its mobile equivalent, most commonly on sites that run a separate mobile site such as m.example.com. Done correctly, each desktop page maps to the matching mobile page. Done badly, they frustrate users and confuse search engines about which URL to index.
Mobile redirects were common in the early smartphone era. Google now recommends responsive web design, which serves one URL to every device and makes mobile redirects unnecessary.
Mobile redirects still show up during audits of older enterprise sites, acquired properties and regional microsites that were built before responsive design became standard. They are also a common symptom of compromised sites, where malicious scripts redirect only mobile users from search so the problem stays hidden from desktop-based site owners. Either way, the fix starts with mapping every redirect a smartphone user agent receives and checking where it lands.
How it works
flowchart LR
A[Phone requests example.com/pricing] --> B{Device detection}
B -->|Smartphone| C[Redirect to m.example.com/pricing]
B -->|Desktop| D[Serve desktop page]
C --> E[Mobile page: canonical to desktop URL]
D --> F[Desktop page: rel=alternate to mobile URL]
For a separate mobile site to work well:
- One-to-one mapping: every desktop URL redirects to its exact mobile counterpart.
- Bidirectional annotations: desktop pages declare
rel="alternate"with a media query pointing to the mobile URL; mobile pages declarerel="canonical"to the desktop URL. - Consistent detection: Googlebot Smartphone must be redirected the same way as mobile users.
- No dead ends: if a mobile equivalent does not exist, serve the desktop page rather than redirecting to the homepage.
Examples
- For example, a legacy SaaS site redirects every mobile request for a blog post to m.example.com, its mobile homepage. Mobile visitors from search never reach the article. Fixing the mapping restores the content.
- A WordPress site starts redirecting mobile visitors from search to a gambling page. The cause is a malicious script, a classic sneaky redirect that needs a security cleanup and a reconsideration request if Google applied a manual action.
Best practices
- Prefer migrating to responsive design; it removes a whole class of bugs.
- If you keep an m-dot site, test redirects with a smartphone user agent across all templates.
- Keep redirect chains short and avoid redirect loops between hosts.
- Watch for mobile-only redirects added by ad networks or compromised plugins.
Common mistakes
- Redirecting all mobile traffic to the mobile homepage.
- Forgetting canonical and alternate annotations, which splits signals between hosts.
- Blocking Googlebot Smartphone from the mobile host in robots.txt.
Related terms
Sources
Frequently asked questions
What is a faulty mobile redirect?
It is when a smartphone user requesting a specific desktop URL is redirected to an irrelevant mobile page, usually the mobile homepage, instead of the equivalent mobile URL. Users lose the content they wanted, and Google may show the problem in search results or drop rankings for those pages.
What is a sneaky mobile redirect?
A redirect that sends mobile users to different content than search engines and desktop users see, often to spammy or affiliate pages. It frequently comes from compromised sites or rogue ad scripts. Google's spam policies prohibit sneaky redirects and can apply manual actions.
Should I use 301 or 302 for mobile redirects?
Google's separate-URLs guidance accepts either an HTTP redirect or a JavaScript redirect, combined with rel=alternate and rel=canonical annotations that tie each desktop and mobile pair together. The annotations matter more than the status code. Most sites avoid the question by moving to responsive design.