Skip to main content

How to Fix 404 Page Not Found Error and Redirect Page To Custom URL

More or less every blogger faced 404 error during their blogging carrier. If you are a Google webmaster user, you must aware this 404 error and how to fix this. The 404 error occurs due to broken links. Broken links refer to pages that no more exist on your blog. This may happen because you might have been deleted the post, changed the URLs over time or visitors misspelled the URL. Read also : Google Webmaster Tools - Complete Guide.

How To Find 404 Errors

To check 404 error for your blog you must have to use Webmaster tools. Google Webmaster tool is one of the best and free tool to analyze your blog. If you are an existing Google account holder you directly login to Google Webmaster tools with your existing Google account. Otherwise you need to create a Google account first.

After login to Google Webmaster tool, you need to add your blog to Google Webmaster tool and then very that you are the owner of the blog. There are four methods to very your blog. Follow any one method to very the blog. Blogger's use meta tag method to very their blog.

Read also : How to add your blog to Google Webmaster Tools.
                         How to submit blogger sitemap to search engines.

Once you very the blog, your blog will appear on the Google Webmaster. Once Google crawled all your blog data, click on your blog name or click view details in the Google Webmaster tool to analyze your site.

How To Fix 404 Error

Bloggers can fix this 404 error in two ways. One is redirecting all broken links to homepage and the other is redirect broken link to custom URL. Here I will discuss both the method so that you can fix 404 error according to your choice.

Redirect to Custom Page URL

It is one of the preferred method to fix 404 error for particular broken link. Using this method bloggers can fix each and every 404 error and fix it with the relevant post / page. Follow below steps to fix 404 error by redirecting to custom page URL.

Step 1. Go to Blogger dashboard and then click Settings and then click Search preferences.

Step 2. Under Errors and redirections, you will find two options namely Custom Page Not Found and Custom Redirects. Here you need to click Edit button of Custom Redirects. If you do not see From and To then click New redirect button. Now in the From box enter the deleted URL or the URL that gives 404 error and in the To box enter the correct URL where you want to redirect the page.
Remember, no need to enter the whole URL in the From and To box instead enter the URL excluding the domain name. After that click checkbox Permanent and then click Save changes.


I am showing you one example here. In my blog I had deleted one post accidentally. When I login to my Google Webmaster account, I found    links with 404 error. Now obviously, it is necessary to fix it immediately so that readers can land to their preferred post. Therefore, I need to fix this issue by redirecting this link to To fix this issue in the From box, I just need to enter the   /2013/08/HowToDownloadBloggerTemplate.html     instead the whole link and in the To box I need to enter the  /2013/08/how-to-download-blogger-template.html    instead the whole link. Remember there must be a forward slash ( / ) at the beginning.

Redirect All Broken Links to Homepage

If you do not want to fix 404 error for all broken links one by one then it is better to redirect to the homepage of your blog. Follow below steps to fix 404 error by redirecting to homepage page.

Step 1. On the Blogger dashboard,  click Settings and then click Search preferences.

Step 2. Under Errors and redirections, click Edit button against Custom Page Not Found. Now you just need to enter the below text and code and then click Save changes.

Sorry, the page you're looking for in this blog does not exist. You will be redirected to the homepage shortly.
<script type = "text/javascript">
PNF_redirect = setTimeout(function() {
location.pathname= "/"
}, 3000);

According to you, you can modify the text which is going to be displayed for the broken links. If you wish to redirect the broken links rather than homepage then replace   pathname  with   href  and  " / "  with the url of the page. In the above code, the number 3000 is expressed delay time in milliseconds which can also be changed as you want.

That's it! Thanks for reading the post. Feel free to comment and share the post. Your one comment and share can appreciate me lot.