Due to m=1 in the Blogger blog, you're having duplicate content troubles. And I'd like to get rid of the m=1, but it's not doable. You can hide it momentarily but not permanently. Let's look at how to fix the Blogger m=1 duplicate content issue and improve the blog's SEO.
For a website to rank, it must optimize its content for search engines. What if the same material is served over two separate URLs? Yes, we're referring to Blogger. The identical webpage is served by Blogger CMS through two URLs: one for desktop users and the other for mobile users.
Canonical URL is served to desktop users by Blogger CMS, and canonical URL with m=1 is served to mobile users by Blogger CMS. We'll show you how to fix the Blogger m=1 issue for your Blogger blog in this article.
- Desktop Version: https://www.example.com/
- Mobile Version: https://www.example.com/?m=1
However, if all you want to do is remove m=1 off the end of the web page URL, this tutorial isn't for you because we're not here to mess with your on-page SEO.
You can remove m=1 and add some script, however search engines will penalize your blog by lowering its page rank.
We can supply you with such a script, but we won't because we're here to improve the blog's SEO, not destroy it. Before you use any script or anything else, make sure you read this entire post. Do things in an appropriate manner.
Is it Possible to Remove m=1 from Blogger?
No, because we don't have access to the Blogger root, it's almost impossible for us to remove the m=1 from the URLs. But what if I tell you that you don't need to remove /?m=1 from your Blogger blog posts?
By adding javascript code to the theme file, you can hide m=1 from URLs served on mobile devices, but the javascript will only visually hide the m=1, not remove it. The HTTP header response as well as the Google PageSpeed Insight tool can be used to verify this. As a result, the javascript injection strategy will cause problems with on-page SEO. But don't worry, we've figured out how to do it perfectly.
Blogger delivers various URLs with and without m=1 for mobile and desktop platforms, respectively. Different URLs for the same post occur in the same way. In this scenario, we can indicate that both the canonical URL and the URL with m=1 should be treated the same by Google.
Solve the issue of Blogger – Duplicate, submitted URL not selected as canonical
This article is not for you if you wish to delete m=1 from the Blogger blog URL, as we already mentioned.
You can resolve the SEO issues of duplicate URLs and URLs that have not been designated as canonical. The server delivers distinct URLs for mobile and desktop, which causes this issue. As a result, we'll tell the search console that both URLs must be treated as one.
How to solve Blogger m=1 issue
This article is not for you if you wish to delete m=1 from the Blogger blog URL, as we already mentioned.
You can resolve the SEO issues of duplicate URLs and URLs that have not been designated as canonical. The server delivers distinct URLs for mobile and desktop, which causes this issue. As a result, we'll tell the search console that both URLs must be treated as one.
- First of all go to Blogger Dashboard.
- Go to Theme Section.
- Click on Edit HTML.
- Press CTRL+F and find </body>
- Copy the code given below and paste that code above </body> tag.
- And click on Save Theme.
<script type='text/javascript'>
//<![CDATA[
var uri = window.location.toString();
if (uri.indexOf("%3D","%3D") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("%3D"));
window.history.replaceState({}, document.title, clean_uri);
}
var uri = window.location.toString();
if (uri.indexOf("%3D%3D","%3D%3D") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("%3D%3D"));
window.history.replaceState({}, document.title, clean_uri);
}
var uri = window.location.toString();
if (uri.indexOf("&m=1","&m=1") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("&m=1"));
window.history.replaceState({}, document.title, clean_uri);
}
var uri = window.location.toString();
if (uri.indexOf("?m=1","?m=1") > 0) {
var clean_uri = uri.substring(0, uri.indexOf("?m=1"));
window.history.replaceState({}, document.title, clean_uri);
}
//]]>
</script>
If the code does not work or you’ve faced any error/problem then please download the source code files from the given download button.
0 Comments