• Skip to main content
  • Skip to primary sidebar
Making Different

Making Different

Create, Learn, Build or Fix

  • Tech
  • Business
  • Relationship
  • Health
  • Travel
You are here: Home / Blogging / How to redirect 404 Error (Page Not Found) to homepage in Blogger

How to redirect 404 Error (Page Not Found) to homepage in Blogger

June 12, 2013 by Nitin Maheta

When a user lands to a nonexistent or deleted URL on your blog, Blogger will display this Error 404 (Page Not Found) i.e. “Sorry for the inconvenience, the page you are looking for has no existence”. This may be a shot of loosing a blog reader. In light of the fact that just not many users will think to move at home page or use search bar to inquiry that specific content on your blog. I am sure many of reader will leave your blog and move again to their search items. Before you loose your new reader for your blog you should redirect to a reader to homepage (or any post page) when comes to a deleted or nonexistent page or post of your blog. so, there is 2 ways to we can redirect 404 page to homepage. one of the way to redirect is to use meta refresh and second method is by using JavaScript. so, personally i don’t like to add JavaScript because it’s effect to blogger loading time. that’s why I’m not recommended you to use JavaScript method for it. but here i show you both method you can use one method as you preferred form it. (meta tag refresh – recommended)

404-not-found-error-54

Method: 1 Meta Tag Refresh ( Recommended )

Go to Blogger Dashboard > Select a blog > Switch to Template tab > Edit HTML
Now search for <head> tag (using CTRL + F )
Copy and paste below code just below/after <head> tag

<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
Oops! Page does not exist. We are redirecting you to home page.
<meta content='5;URL=http://www.your-blog-url.com' http-equiv='refresh'/>
</b:if>

blogger head tag

Note : Change http://www.your-blog-url.com with your blog homepage URL

Finally save your template > Done.

Method: 2 Using JavaScript

Go to Settings > Search Preferences > Custom Page Not Found ( under Error and redirections)
Click Edit and paste below code:

Sorry, the page you were looking for in this blog does not exist. You will be redirected to homepage shortly.
<script type = "text/javascript">
//Blogger 404 Redirect v1.0 (makingdifferent.com)
BSPNF_redirect = setTimeout(function() {
location.pathname= "http://www.your-blog-url.com/"
}, 5000);
</script>

bloggger

Note : Change http://www.your-blog-url.com/ with your blog homepage URL and 5000 is the delay time in Milliseconds. Anyone can change it. Changing the value to Zero (0) would redirect immediately. (no delay)

Click Save Changes > Done.

Now you can test the error page code is working by entering URL that doesn’t exits in your domain. (e.g. http://your-blog-url.com/404 )



About Nitin Maheta

Nitin Maheta is editor in chief and webmaster of MakingDifferent Blog. You may reach him out on following social media:

Facebook | Twitter | Instagram

Primary Sidebar

Similar Posts

  • Successful Blogging Tips for Newbies

Random Posts

heart-touching-love-messages-for-your-sweetheart

Heart Touching Love Messages for Your Sweetheart

By Nitin Maheta

Trichologist

How to make a successful career in Trichology?

By Nitin Maheta

how-to-find-someones-location-on-facebook

How to Find Someone’s Location on Facebook

By Nitin Maheta

dermatology

What is dermatology?

By Nitin Maheta

best-kodi-alternatives

5 Best Kodi Alternatives That You Must Try

By Nitin Maheta

All categories | About us | Contact us | Privacy policy | Disclaimer | Write for Us | Dictionary | Sitemap

The owner of this site is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.

© 2025 Making Different