On this page
What this issue is
Years ago, many sites built a separate mobile version on a subdomain such as m.example.com. A rule on the server, CMS or a plugin checks the visitor's user agent (the text a browser sends to identify itself) and redirects phones to that copy. Desktop visitors stay on the main site.
The issue appears when the m. site is neglected. It may return a 404 or 500 error, redirect back to the main site in a loop, show old content, miss the lead form, or point to a domain that no longer has a valid certificate. The main site can look perfect on desktop while every phone user hits a dead end.
Why it costs you leads or sales
Most paid and social clicks happen on phones. If the redirect fails, those visitors land on an error page or a stripped-down copy. You pay for the click and get nothing back.
Redirects can also drop tracking. If the redirect discards gclid, fbclid or UTM parameters, your ad and analytics platforms cannot attribute the visit. Your reports then undercount mobile conversions, and ad bidding learns from bad data.
- Ad click on phoneLands on www.example.com/offer
- Mobile redirectUser agent rule sends phone to m.example.com
- m. page404, 500, loop or no form
- Lead or purchaseNever reached
The visitor clicks an ad on a phone, but the redirect sends them to a page that fails.
The phone visitor is redirected and the campaign parameters disappear on the way.
Example: desktop converts normally while mobile collapses because of the broken redirect. Numbers are illustrative.
How to check if your site has it
Desktop testing will not show this problem, because the rule depends on the device. You need to look at your site as a phone.
Open your key landing page on a real phone
Use mobile data as well as Wi-Fi. Note the final URL in the address bar. If it contains
m.ormobile., a redirect is active.Check with the browser's device mode
In Chrome, open DevTools, click the device toolbar icon, choose a phone and reload. Open the Network tab and look for 301 or 302 responses and the final status code.
Test from the command line
Request the page with a phone user agent and follow redirects (see the snippet below). Look at every Location header and the final status.
Test with campaign parameters
Add
?utm_source=test&gclid=abc123to the URL and check whether those parameters survive the redirect.Test the form on the m. page
Submit a test lead and confirm it arrives in your inbox or CRM.
curl -sIL -A "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1" "https://www.example.com/offer?utm_source=test&gclid=abc123" | grep -iE "^(HTTP|location)"How to fix it
The best fix is to retire the m. site and use one responsive site that adapts to any screen. One URL per page is also simpler for search engines and for tracking. If you cannot do that now, repair the m. site and the redirect so no visitor hits an error.
Find where the redirect is defined
Common places: server config (
.htaccess, nginx), a CMS or mobile plugin, a CDN rule, a script in the page head, or your DNS host.Make sure the main site works on phones
Confirm the page has a viewport meta tag and a layout that fits small screens before you remove anything.
Remove the user agent redirect
Delete or disable the rule that sends phones to the m. host.
Redirect old m. URLs to the main site
Add a 301 redirect from each m. URL to its matching desktop URL, keeping the query string, so old links and bookmarks still work.
Retest on a phone
Repeat the checks above, including the parameter test and a test form submission.
Disable mobile redirect plugins
In Plugins, look for mobile switcher or mobile theme plugins and deactivate them. Check your caching plugin for a separate mobile cache or mobile redirect setting.
Check redirect plugins
If you use a redirect manager, delete rules that match mobile user agents.
Check your theme and apps
Shopify themes are responsive by default. Look in Online Store > Themes > Edit code for scripts that use
window.locationbased on screen width or user agent, and review installed apps that add mobile redirects.Review URL redirects
In Online Store > Navigation > View URL redirects, remove entries that send traffic to an old m. domain.
Check custom code
In Project settings > Custom code and in each page's settings, look for scripts that redirect based on user agent or width.
Check 301 redirects
In Project settings > Hosting, review 301 redirects and remove any that point to an m. host.
Use one responsive site
Wix serves a mobile view from the same URL. If phones go to a different domain, check Settings > Custom code and Marketing integrations for redirect scripts, and review Settings > Domains and redirects.
Check URL mappings and code injection
In Settings > Developer Tools > URL Mappings, remove rules that point to an m. host. Check Code Injection for redirect scripts.
Remove the server rule
Delete the rewrite block that matches mobile user agents in Apache or nginx, then reload the server.
Add a 301 from m. to www
Use the snippet below on the m. host so old links land on the main site with their query string.
server {
listen 443 ssl;
server_name m.example.com;
# ssl_certificate and ssl_certificate_key go here
return 301 https://www.example.com$request_uri;
}Before
- Phone is redirected to m.example.com
- Page returns an error or has no form
- gclid and UTMs are dropped
- Mobile leads near zero
After
- Phone stays on www.example.com
- Responsive page shows the full form
- Parameters stay in the URL
- Mobile leads recorded and attributed
How to confirm it's fixed
- A phone loads your landing page and the address bar still shows the main domain
- The curl test with a phone user agent returns 200 with no redirect to an m. host
- Old m. URLs return a single 301 to the matching main URL
gclidand UTM parameters remain in the final URL- A test form submission from a phone reaches your inbox and CRM
- The conversion shows in your analytics real-time report or tag debugger
How to prevent it happening again
- Keep a list of every subdomain and what it is for, and retire unused ones
- Review redirect rules whenever you change theme, CDN, hosting or plugins
- Test key pages on a real phone after each release
- Keep ad destination URLs on the main domain, never on an m. host
- Renew certificates for every host that still receives traffic
- Run a scheduled mobile journey test so a change is caught within a day
How FunnelGuard handles this
FunnelGuard detects this issue only partly. If you have set up a mobile journey, the robot visitor runs that journey on a schedule and checks each step. If a mobile redirect sends it to a page that errors, or the form or button is missing, the step fails. A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause.
What it does not do: it does not scan your server or DNS for every redirect rule, and it does not test every device or user agent a real visitor might use. Without a mobile journey, the check does not run. It also cannot judge whether an old m. page that still loads is outdated or off brand.
Frequently asked questions
Questions people ask
Why are my mobile visitors being redirected to an m. site?
A rule on your server, CMS, plugin or CDN checks the visitor's user agent and sends phones to a separate mobile subdomain. It is often left over from before responsive design was common. Check your server config, mobile plugins and redirect settings to find it.
Why is my m. site showing a 404 or error?
The m. site was likely abandoned while the redirect stayed active. The host may point to a removed server, an expired certificate or pages that no longer exist. Remove the redirect and serve phones from your main responsive site.
Do I still need an m. subdomain?
No. A single responsive site works on all screen sizes and is simpler to maintain and track. Separate mobile sites mainly add duplicate content, extra redirects and more chances for failure.
How do I test a mobile redirect from my desktop?
Use Chrome DevTools device mode and watch the Network tab, or run curl with a phone user agent and the -L flag to follow redirects. A real phone on mobile data is the most reliable test.
Can a mobile redirect remove my gclid and UTM parameters?
Yes. If the redirect rule does not pass the query string, parameters like gclid and utm_source are lost. Your analytics and ad platforms then cannot attribute mobile conversions to the campaign.
How do I redirect old m. URLs to my main site?
Add a 301 redirect on the m. host that sends each URL to the matching main-site URL and keeps the query string. In nginx, use return 301 with $request_uri. Keep a valid HTTPS certificate on the m. host.
Can FunnelGuard detect a broken mobile redirect?
Partly. If you have a mobile journey set up, FunnelGuard runs it and fails the step when the redirect leads to an error or a missing form. It does not scan your server rules or test every device, so check those by hand.
Related issues
- PRF-160Missing viewport meta tag (desktop page shrunk on phones)Fix guide
- PRF-171Content hidden on mobile (display:none) including the form or CTAFix guide
- PRF-172Different/missing content on mobile vs desktopFix guide
- PRF-176Layout broken on tablet widths (768-1024 px)Fix guide
- PRF-168Hamburger menu does not openFix guide
- PRF-154Horizontal scroll / content wider than viewport on mobileFix guide