Solving the Problem with Blogger’s Custom Redirects feature on Mobile

redirect loop problem

Custom Redirects were launched in March 2012 and gave Blogger users the ability to change the permalink structure of the all types of pages on their blogs . It allows two kinds of redirects namely 301 Moved Permanently type (Which lets you pass SEO value) and 302 Moved Temporarily (Used for Coming Soon Pages or when a page is under maintenance ).  This is extremely useful for people who are migrating from other platforms , as they can now easily able to redirect pages with different permalink structure than Blogger’s default to a new page. Recently there have been some issues with it , which have become a cause of frustration for many users.

What is the problem

When a Custom Redirect (example ) is opened in a Mobile browser , it leads to a Redirect Loop (See Screenshot below) which doesn’t allow the visitor to open the blog. This becomes a big problem when the redirect is used on the homepage of the blog (example or a custom domain like ) which makes it impossible for the user to even visit the blog.

too many server redirects

Why this happens

The main reason for this problem occurring is the mobile parameter that Blogger adds from the server side. The m=1 parameter interferes with the custom redirect and breaks the whole functionality (As you can see in the short GIF Below). Until last year if  a custom redirect with mobile parameter was entered in a normal web browser (example ) it would lead to a 404 page , but this error was fixed by Blogger Team.

redirects from m=1 to non m=1 loop custom

How to Solve this Problem
As the custom Redirect feature doesn’t work universally , you can always use good old JavaScript for this. Firstly I would suggest to remove the specific redirect from Settings > Search Preferences > Errors and redirections > Custom Redirects . Then go to Template > Edit HTML and search for <head> tag and add the following code just below it (Backup your template before doing this)

For example sake , I am assuming we want to redirect to

if(window.location.href == '' || window.location.href ==  '' )

As you can make out , this is just tests if the current URL is the normal or mobile version of the URL you want to redirect , if it matches then it redirects to the URL of your choice. This works in Desktop and Mobile browsers just fine ( See Youtube video below )

What is Blogger doing about it
If you want to redirect a large number of pages , then it will become unmanageable and confusing to keep adding new snippets of code to the template. This work is best done by Blogger at the Server side. As of now this issue has been escalated to the Blogger Team and they are looking into it . Hope they will fix this issue soon

If you are currently having problems with Blogger , feel free to share them in the comments , I will try to help out to my best of abilities

27 Replies to “Solving the Problem with Blogger’s Custom Redirects feature on Mobile”

  1. hi #Prayag Verma i do as you step and paste below head, but still not change.. can u help me?.. I want my view blog in Mobile same with Desktop view when i open in android. My blog is i tried a lot style and various of source but still not change. When i open my blog in android my sidebar widget and header was missing, after i using code html mobile= 'yes' if have apppear but just appear in my footer side when i saw in android. I hope u can help me.. Thank you..

  2. I recently started a new website for my business and was facing the same problem. I tried to redirect my domain to

    I've followed the technique you suggested in the above post however it's redirecting only on the desktop version of theb site and not the mobile version.

    The code #39;?m=1' || window.location.href == '') appeares in red.

    Please let me know how to fix it. Any help would be great

  3. This solution works great for me – I just had a couple of issues when using this:

    In my application I wanted to use the redirect to be used to point to a 'fake homepage' for my blogger, however I also wanted people to be able to view my blog as normal. To workaround this I labelled all my blogposts with an arbitrary identical label and just set up a search for that label so users could view all my blog posts with that label.

    The second thing to be wary of is regarding the if statement, remember that the URL you wish to redirect from may have a "/" on the end of it even if it doesn't always show in your browsers address bar. πŸ™‚

  4. Hello, Thanks for the advice. I now understand why the problem occurs.

    When I paste in the code, it works on the mobile site, but them creates a problem for the main site. It just flashes up with a '1' and creates a loop…

    Any thoughts?

Leave a Reply

Your email address will not be published. Required fields are marked *