What is 404 page not found error?
Let us understand 404 page not found error code with an example.You asked shopkeeper about a product.If the product is available then he will give you that.But in case it is not available then he will say it does not exist.Similarly web server returns code 200 if a resource (image,video or page) is found on your website.If the resource does not exist then it will return 404 error code.
What are the causes of 404 page not found?
Each resource on your website (image,video and posts) have unique URL (means address).The address and resource mapping should be correct to avoid 404 error code.If this mapping is not right then 404 error will be thrown.I am listing few scenarios below
- Visitor typing wrong URL in browser address bar.
- You have moved your resource to new location and forgot 301 redirect from old location to new location.
- Broken links on your website.You might have linked to a page on your website which was deleted later or moved to different location.
- You restructured your website but old links are still in use.Someone is linking to your page using old link.
Why 404 pages not good?
One of the reason for 404 pages is broken links.Broken links on your website decrease crawl-ability.Search Engine Bots do not like broken links.Decrease crawl-ability means low number of pages on search engine which in turn decreases traffic.So from SEO point of view broken links are very bad.
404 pages are not good experience for visitors as well.If someone clicks a link on your site or other site and landed on 404 error page then negative impression is bound to creep in.It is very frustrating experience for a visitor.
How to find 404 pages on your website?
There are many ways to find 404 pages on your website.Since 404 pages are important for every webmaster this information is made available in Google webmaster tools as well as Bing webmaster tools.Both these tools list all the 404 pages they found while crawling your website.You should go through the log and correct the issue as soon as possible.
Using Google webmasters
- Log into your Google webmasters account.
- Go to Health –> Crawl Errors options.
- You can see all 404 error page URL listed under Not Found.
Using Bing webmasters
- Log into your Bing webmaster account
- Go to Reports and Data –> Crawl Information
- You can see list of all pages generating 404 error codes.
Ways to find Broken links on your website
You can use free tools like screaming frog to find broken links on your website.This tool is free for 500 URL only.You can download this tool,install it and scan your website for presence of broken links.
For WordPress content management system users there is an excellent plugin Broken links which helps you find broken links on your website and fix them as well.
How to fix 404 page not found error?
- You should remove all the broken links on your site.
- In case you have moved your page from one location to different location then use 301 permanent redirect from old page to new page.WordPress users can use Redirection plugin for this purpose.There might be similar plugin for this task in other content management systems.
- You should delete the old post which is getting redirected to new post.Keeping the old post will include that post in your sitemap (if you are generating it automatically).
3.Remove reference to pages not present on your site from sitemaps and other places on your website.
Google and Bing guidelines for 404 pages
Bing and Google both have come up with 404 page guidelines.You can read the Bing 404 guidelines (I am referring to Bing 404 pages guidelines because I found that one more detailed and also mentions the issue described above).In short they stress on below two points
- Keep the page lightweight.Do not use advertising on these pages.
- 404 pages should not return 200 error code.I have written separate post to deal with this issue in detail.404 pages may return 200 code if the pages are cached.WordPress plugin W3 Total Cache does provide option for caching 404 pages.
What should be added on 404 error page?
You can not avoid 404 pages fully.So you need to create 404 pages which can serve below purpose
- Retain your visitors.Visitors should not be leaving your website and going to search engine.
- The page should be light and give visitors some information to keep them interested.
- Visitors should get proper message and interface to search your website.
- You can make some money from these pages as well.
Visitors hitting 404 page should be retained.They should search your site instead of going back to search engine and searching.We can also provide them content similar to what they were looking for and arrived on your website.Presenting similar content and matching URL to URL they entered and arrived on your website is very good idea.
All the points mentioned above can be taken care of using Google webmaster 404 widget. Google webmaster 404 widget is free of cost and very easy to implement.Below is Google webmaster 404 widget code for this website
To use it on your website you need to create Google webmaster 404 widget code for your website using this link.After code creation paste the code before </body> tag of your webpage.It is better to paste it on page handling your 404 page so that the code gets loaded only in case of 404 page.
WordPress users can search their theme for presence of 404.php file and insert this code in appropriate place.404.php file is responsible for handling 404 page in WordPress theme structure.
We should ideally place a search box as well on 404 error page.This will help user search your website for the content not search engines.Most content management system themes come with search box on 404 page.But these search boxes do not make money for you.
Remember Bing has advised against usage of any advertising on 404 page.So instead of using advertising for money generation we can replace default search box with Google custom search box.Using Google custom search box will serve two purpose
- Uses power of Google Search to search your website and present the content to user.
- Helps you make money from search.
I have written separate post to cover Google custom search and adding it on your website.You can read the post here.
Feel free to share this post and your queries.