How To Fix “404 Page Not Found” Error On “?m=1” Redirect'

How To Fix “404 Page Not Found” Error On “?m=1” Redirect

Basically this problem occurs after you migrate from Blogger to WordPress. Blogger adds an extra query string “m=1” at the end of the URL when a mobile user visits the website. But WordPress Doesn’t.

For this reason, you may saw that the search indexes of google added “m=1” query string when users searches from android or other mobile devices. When the user visits from that URL, they get 404 error in WordPress because the page with that extra query string doesn’t exist for WordPress.

To Fix this Issue, we need to add redirections but it’s almost impossible to do that individually, when you have a huge numbers of articles/posts. So, here we are. We will show you how you can solve the problem at once.

Also Read,

How To Change Page URL Without Losing SEO Rank

There are few ways you can do this. Here we will show you how to do that using CloudFlare and also using Cpanel by editing .htaccess file. If you are not using CloudFlare then go with the “.htaccess” file editing method.

FIXING 404 ERROR ON ?m=1 REDIRECT USING CLOUDFLARE

First of all, login to your CloudFlare account and select your domain. Then follow the steps:

  1. Click on the “Rules” tab
  2. Go to the “Transform Rules” and click on “Create Transform Rules” and then Select “Rewrite URL
    FIXING 404 ERROR ON ?m=1 REDIRECT USING CLOUDFLARE
  3. In “Rule Name” input box, type any name you want. In “Field” dropdown, Select “URL Query String“. Keep the “Operator” dropdown field “Equals“. In “Value” input box, type “m=1“.
    FIXING 404 ERROR ON ?m=1 REDIRECT USING CLOUDFLARE
  4. In “Query” Select “Rewrite To...” and keep the Field “Static” and the value Empty. Then click on “Deploy
    FIXING 404 ERROR ON ?m=1 REDIRECT USING CLOUDFLARE
  5. Done!

FIXING 404 ERROR ON ?m=1 REDIRECT USING CPANEL

[NOTE: If you already followed the method of fixing the problem using CloudFlare then don’t precede this one too. Only one method needs to be followed]

First of all, login to your Cpanel. Then follow the steps below:

  1. Under “File” section, click on “File Manager“.
  2. Go to the root location of your domain/website. Basically it’s “public_html” folder and for subdomains, it’s named like this “subdomain.domain.com
  3. On the top right corner, click on the “settings” and check “Show Hidden Files (dotfiles)” and click “save”
    Screenshot2021 11 16at19 41 45cPanelFileManagerv3
  4. Now “.htaccess” file will be visible, click the mouse right button on that and click “edit
    FIXING 404 ERROR ON ?m=1 REDIRECT USING CPANEL
  5. A popup Confirmation will appear, Click on “edit” again
    Screenshot2021 11 16at19 47 41cPanelFileManagerv3
  6. Now Paste this at the top of the “.htaccess” file:
    RewriteCond %{QUERY_STRING} ^m=1$
    RewriteRule ^(.*)$ /$1? [R=301,L]
  7. Done!

Congratulations!

You have successfully fixed the “?m=1” 404 error issue. Now even visitor visits your URL ending with “?m=1”, it will no longer show the “404 page not found” error and the visitors will be able to read your posts/articles.

Thanks For Allowing Us To Help You 🙂
If you are confused or want to know something, then let us know in the comment box, we will reach you as soon as possible. Don’t Forget To Subscribe our Newsletter, YouTube Channel, and Like Our Facebook Page To Keep Updated With Awesome Things. Follow us on Twitter to stay updated with the latest news & changes.

Did you like it?