HOW TO REMOVE ?M=1 OR "? M=1" FROM URL IN BLOGGER/BLOGSPOT

HOW TO REMOVE ?M=1 OR "? M=1" FROM URL IN BLOGGER/BLOGSPOT



What is "?m=1" in Blogspot URLs?

When you see "?m=1" at the end of a Blogger URL, it's a parameter that Google uses to display the mobile version of your blog on mobile devices. This parameter helps in adapting the website’s interface for better viewing on smaller screens. But why should you consider removing it, and how can it affect your blog’s performance? Let’s decipher.

Why Remove "?m=1" from Blogspot URLs?

There are a couple of reasons why you might want to remove "?m=1" from your blog's URL:

  1. Aesthetic and Professionalism: Many website owners find "?m=1" unprofessional, especially when compared to the cleaner URLs of WordPress sites.

  2. Canonical Errors: Sometimes, this parameter can cause canonical errors in the search console. The entire URL remains the same, but when accessed from a mobile device, "?m=1" is appended, potentially leading to indexing issues.

Step-by-Step Guide to Removing "?m=1"

Step 1: Log in to Your Blog Dashboard

Go to the "Theme" section.

Step 2: Edit HTML

Click the drop-down arrow next to the "Customize" button and select "Edit HTML."

Step 3: Backup Your Blog

Before making any changes, backup your entire blog. This ensures you can restore your content and settings if anything goes wrong during the theme code editing process.

Step 4: Locate the </body> Tag

In the HTML editor, press "Ctrl + F" and search for </body>. You can also scroll to the bottom of the HTML code.

If your using smartphone or tablet you can read. How to search HTML code of Blogger or BlogSpot blog using android phone or tablet

Step 5: Insert the Code

Copy the code below and paste it just before the </body> tag. Finally, save the file.

html
Copy code
<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>

That's it! You've successfully removed "?m=1" from your Blog URL, ensuring a cleaner and more professional look for your Blogger site.

SEO Considerations

Using this script won't permanently remove "?m=1" from your URLs—it’s a redirection in the user's browser. While it might slightly improve speed, variations are more likely due to server response times rather than the redirect itself.

Many bloggers don’t use this script, but removing "?m=1" can give your blog a more professional appearance. However, remember that SEO involves experimenting and testing various methods. Always research and ensure no foreseeable issues before making changes.

Optimizing your website for the best performance should always be your priority.

Post a Comment

Previous Next

نموذج الاتصال