If you own a Blogger blog, you might have noticed that when accessed on a mobile device, your blog’s URL gets appended with the query parameter ?m=1
. While Blogger claims that this redirection is harmless, it can lead to issues in Google Search Console such as:

- Alternative page with proper canonical tag
- Page with redirect
These errors may affect your blog’s indexing and performance in search engines.
Why Does This Happen?
When Google’s smartphone crawler visits a post like /2025/01/post.html
(found in your sitemap.xml
), it gets redirected to /2025/01/post.html?m=1
because the crawler mimics a mobile device. Since the canonical tag points to /2025/01/post.html
, the ?m=1
version is marked as an alternate page with proper canonical tag. This can lead to indexing delays and potential SEO issues.
Workarounds to Prevent ?m=1 Redirection
Blogger does not offer a native way to stop this behavior, but there are two server-side workarounds using Cloudflare:
1. Using Cloudflare Workers (Recommended)
This method prevents redirection by modifying responses at the server level. It works as a middleware between the user and Blogger, ensuring mobile and tablet users do not get redirected to ?m=1
.
Steps to Implement:
- Login to Cloudflare and go to the Workers & Pages section.
- Click on Create application > Workers > Create Worker.
- Rename the worker as
m-redirect-blogger
and Deploy it. - Click Edit Code and replace it with the following:
/**
* Environment interface
*
* @typedef Env
* @property {string} my_var
*/
// Constants
const MOBILE_REGEX = /(?:phone|windows\s+phone|ipod|blackberry|(?:android|bb\d+|meego|silk|googlebot) .+? mobile|palm|windows\s+ce|opera\ mini|avantgo|mobilesafari|docomo|KAIOS)/i;
const TABLET_REGEX = /(?:ipad|playbook|(?:android|bb\d+|meego|silk)(?! .+? mobile))/i;
/**
* Detects the device type from the User-Agent.
*
* @param {string | null} userAgent
* @returns {"mobile" | "tablet" | "desktop"}
*/
const getDeviceType = (userAgent) =>
MOBILE_REGEX.test(userAgent || "") ? "mobile" :
TABLET_REGEX.test(userAgent || "") ? "tablet" :
"desktop";
/**
* An object with workers handlers
*
* @type {ExportedHandler<Env>}
*/
const worker = {
async fetch(request, env, context) {
const deviceType = getDeviceType(request.headers.get("User-Agent"));
// No modifications needed for desktop users
if (deviceType === "desktop") return fetch(request);
const proxiedUrl = new URL(request.url);
proxiedUrl.searchParams.set("m", "1");
// Create a new request only when necessary
const proxiedRequest = new Request(proxiedUrl, {
method: request.method,
body: request.body, // Use body directly without cloning unless needed
headers: new Headers(request.headers),
redirect: "follow"
});
// Remove `Content-Length` if modifying request
proxiedRequest.headers.delete("Content-Length");
// Fetch the proxied request
const proxiedResponse = await fetch(proxiedRequest);
// Return response directly unless headers need modification
return new Response(proxiedResponse.body, proxiedResponse);
}
};
// Export handlers
export default worker;
- Click Save and Deploy.
- Go to Websites > Select your domain > Workers Routes > Add Route.
- Input your blog URL pattern like
www.yourblog.com/*
and assign it tom-redirect-blogger
.
2. Using Cloudflare Rewrite Rules (Alternative)
If you don’t want to use Workers, you can apply a Rewrite Rule to modify URLs based on the User-Agent.
Steps to Implement:
- Go to Websites in Cloudflare Dashboard and select your domain.
- Navigate to Rules > Overview > URL Rewrite Rules.
- Click Create Rule and name it
Rewrite Blogger Mobile URLs
. - Under Custom Filter Expression, paste:
http.request.full_uri wildcard "http*://www.itisuniqueofficial.com/*" and
(http.user_agent contains "mobi" or http.user_agent contains "Mobi")
- Under Query, select Rewrite to… > Dynamic, and enter:
wildcard_replace(http.request.uri.query, "*", "${1}&m=1")
- Click Deploy.
Limitations
- Cloudflare Workers have usage limits on free plans.
- Blogger does not officially support Cloudflare integration, so use these methods at your own risk.
- Does not work on
.blogspot.com
subdomains as they do not allow Cloudflare DNS management.
Conclusion
While these methods do not completely eliminate Search Console warnings, they significantly reduce unnecessary redirections and optimize indexing. If your blog is on a custom domain with Cloudflare, using Cloudflare Workers is the most effective way to prevent ?m=1
redirection. However, always proceed with caution and test your changes to ensure your site remains accessible.
Have you implemented any of these solutions? Share your experience in the comments!