• 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

best-android-tablet

The 20 Best Android Tablets 2014

By Nitin Maheta

patanjali-Logo

How to get Patanjali franchise or distributorship

By Nitin Maheta

Acer-Laptop-battery-is-not-charging

My Acer Laptop is Plugged in & the Battery is Not Charging

By Nitin Maheta

10-Golden-Rules-to-Follow-When-Taking-a-Loan

10 Golden Rules to Follow When Taking a Loan

By Nitin Maheta

Buying a Domain Name – Considerable Precautions & Tips

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