Complete Guide To Redirect 404 Page To Homepage In WordPress

Leave a Comment




How to redirect 404 page to homepage in wordpress ? This is the most common question every wordpress user is having. So, today i thought to write the complete tutorial to redirect 404 pages to homepage.

So basically in this wordpress tutorial we gonna learn couple of things like,
  • What is error 404 page not found.
  • How to redirect 404 page to homepage.
  • How to redirect 404 page to any specific page.


What Is 404 Error Page ?

Whenever your user or visitor landed on non existing/broken url then he/she will be shown the default wordpress 404.php error page. This simply shows that the url you are looking for doesn't exist or removed".

So by seeing this page your user may not search any other page/post and they simply exit from your blog. So what basically happened in this case is you loose your readers. Now, question is what to do, to not loose those loyal readers ? any idea ?

The answer is, you can simply redirect your broken or non existing links to your blog homepage. This will also improve SEO search engine optimization of your blog.

How To Redirect 404 Page To Homepage In WordPress ?

This is very simple. All you have to do is just paste one code snippet in your 404.php file. Just follow the simple steps written below to execute this task.

Step 1 :- In admin area, Go to Appearance >> Editor.

Step 2 :- Open 404.php file.
If it doesn't exist then simply create new blank php file and rename it.

Step 3 :- Paste the below code.



That's all. Now whenever your user landed on deleted or non existing url, they will be redirected to homepage of your blog.
 
Must Read :-

How To Redirect 404 Page To Any Specific Page In WordPress ?

You might do not wanted to redirect 404 page to homepage but instead you wanted to redirect it to any specific post or page of your blog. Then in that case you need to give specific url of your post or page. Just follow the simple steps below to execute this task.

Step 1 :- Repeat step 1 and step 2 from above part.

Step 2 :- Paste the below code.



Note: change "http://solvemyhow.com/404" with your URL.

That's it. Now your user will be redirected to specific page or url of our blog post. Here you may redirect your user to your custom created 404 page too.

So this was the complete guide to redirect 404 page to homepage in wordpress. Hope you found this tutorial informative and worth reading. If you have any query, do let me know in the comments below. In the mean while you can also subscribe for SolveMyHow newsletter to get free updates on SEO, WordPress and make money online tutorials right into your inbox.

Found this tutorial interesting ? Why not help us by shooting those social media buttons below, after all "sharing is caring" right !


Also See :-

How To Create Sitemap For WordPress Blog

How To Submit Wordpress Sitemap To Google

How To Submit WordPress Sitemap To Yahoo And Bing

How To Add Google Analytics For WordPress Blogs

Top 10 Richest Bloggers In The World

Top 10 URL Shortener Websites To Earn Money

0 comments:

Post a Comment