How to remove ?m=1 suffix from blogger url

You are here:
Estimated reading time: 1 min

The m=1 or m=0 suffix in Blogger URLs typically indicates that the page is being accessed in mobile view (m=1) or desktop view (m=0). This suffix can appear when a user switches between desktop and mobile versions of a site.

To prevent m=1 from appearing in your Blogger URLs, follow these steps:

Method 1: Add JavaScript to Redirect URLs Without the m=1 Suffix

  1. Log into Blogger and go to the Theme section.
  2. Click on “Edit HTML” to modify your theme code.
  3. Scroll to the <head> section of your theme and paste the following JavaScript code before the closing </head> tag:
    <script type='text/javascript'>
      // Remove ?m=1 or ?m=0 from URLs
      if (window.location.href.indexOf('?m=1') > -1) {
        window.location.href = window.location.href.replace('?m=1', '');
      }
    </script>
    

    This script checks if the URL contains ?m=1 and, if so, redirects the page to the same URL without the suffix.

  4. Save the changes and view your blog. The m=1 parameter should no longer appear when accessing your site on mobile devices.

Method 2: Use Canonical URL to Avoid Indexing the m=1 URL Version

To ensure that search engines do not index the URLs with ?m=1, add a canonical tag in your blog:

  1. Go to the Theme section of your Blogger dashboard.
  2. Click on “Edit HTML”.
  3. Find the <head> section and add the following code:
    <link rel="canonical" href="https://www.yoursite.com" />
    
    • Replace https://www.yoursite.com with your site’s main URL.
  4. Save the changes.

This canonical tag tells search engines that the main version of your blog is without the m=1 or m=0 suffix.

Method 3: Modify the Blogger Mobile Template Settings

  1. Go to Blogger Dashboard.
  2. Navigate to Theme.
  3. Click on the “Customize” button.
  4. Under Mobile, set the option to “No. Show desktop theme on mobile devices”.
  5. Save the settings.

This way, your blog will not switch to the mobile view, thus eliminating the ?m=1 parameter.

Additional Notes

  • Clearing Browser Cache: If you still see the ?m=1 parameter after making changes, try clearing your browser cache or accessing the site in incognito mode.
  • URL Rewrite: Blogger doesn’t have direct access to .htaccess or URL rewrite configurations, so removing the m=1 is best done using JavaScript or theme settings as described above.
Was this article helpful?
Dislike 0

Author

Joshua

Web Hosting Geek Technical Support Staff G Online Sites