If you’ve seen ?m=1
added to your Blogger site URLs when viewed on mobile, you’re not alone.
This small-looking parameter can have big effects on your site's SEO,
performance, and URL structure consistency.
But don’t worry—I have the solution.
In this guide, I’ll show you three proven methods to remove ?m=1
permanently:
- One using JavaScript, which works without any extra tools
- Two advanced methods using Cloudflare, ideal for custom domains
Let’s fix it and make your blog faster and SEO-friendly today!
๐ Why Remove ?m=1 From Blogger URLs?
๐ What is ?m=1 in Blogger?
?m=1
is a mobile URL parameter added automatically by Blogger to indicate a mobile version of the page.
When users visit your blog on a phone, Blogger appends this to the end of URLs.
Example:
Original URL: https://yourblog.blogspot.com/sample-post
Mobile URL: https://yourblog.blogspot.com/sample-post?m=1
๐ซ Why Is It Bad?
- It can confuse search engines, causing indexing issues.
- It creates duplicate URLs, hurting your SEO.
- It slows down performance with unnecessary redirects.
✅ 3 Proven Methods to Remove ?m=1 From Blogger
๐ Method 1: Remove ?m=1 Using JavaScript
This method is perfect for those not using custom domains or Cloudflare.
๐ง Step-by-Step:
- Go to Blogger Dashboard → Theme
- Click “Edit HTML”
- Scroll before the closing
</body>
tag - Paste this JavaScript code:
<script>
if (window.location.href.indexOf('?m=1') > -1) {
window.location.href = window.location.href.replace('?m=1', '');
}
</script>
- Save your theme
✅ What This Does:
It detects the ?m=1
parameter and instantly redirects users to the clean URL.
Note: This works only on the client-side. It helps SEO to some extent but doesn't change how Google sees your site.
☁️ Method 2: Remove ?m=1 Using Cloudflare Workers
๐ Requirements:
- Your domain must be added and active on Cloudflare
- You should have a free or paid Cloudflare account
๐ What Are Cloudflare Workers?
Workers let you run JavaScript code on the edge, before the page loads. This means we can clean the ?m=1
from the URL
before it reaches the browser.
๐งฉ Steps:
- Log in to your Cloudflare account
- Go to Workers and click Create a Worker
- Paste the code below:
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const url = new URL(request.url)
if (url.searchParams.has('m') && url.searchParams.get('m') === '1') {
url.searchParams.delete('m')
return Response.redirect(url.href, 301)
}
return fetch(request)
}
- Click Deploy and note the Worker URL
๐งญ Next Step: Use Worker Routes
Now, let’s tell Cloudflare when to use this Worker.
⚙️ Method 3: Use Cloudflare Worker Routes
๐ Steps:
- Go to your domain in Cloudflare
- Click on Workers → Routes
- Set the route as:
yourdomain.com/*
- Attach the Worker you created earlier
๐ Example:
If your domain is blog.example.com
, your route will be:
blog.example.com/*
Tip: This method ensures that ?m=1
is removed server-side, and works best for SEO.
๐งพ Summary: Which Method Should You Use?
Method | Works With | SEO Benefit | Difficulty |
---|---|---|---|
JavaScript | All Blogger sites | Low to Medium | Easy |
Cloudflare Worker | Custom Domains | High | Medium |
Worker + Route | Custom Domains | Very High | Medium to Advanced |
๐ Conclusion
You’ve just learned how to remove ?m=1
from your Blogger site in three powerful ways.
- Want a quick fix? Use the JavaScript method
- Want the best for SEO? Go with the Cloudflare method
By following this guide, you’re making your blog more SEO-friendly, faster, and professional.
Ready to take your blog to the next level?
Apply one of these steps today and improve your site’s performance right away.
๐ฃ Call-To-Action
If this guide helped you, don’t forget to share it and help other bloggers too.
Have questions or need help setting this up? Leave a comment below or contact me—I'm happy to help!
/remove-m1-blogger-improve-seo
Post a comment
The development work of our website is not finished yet, comment from the comment page