How to redirect wordpress 404 pages to homepage with 301 for SEO

How to redirect WordPress 404 pages to homepage with 301 for SEO

when some one  comes to your site by a search query or redirection through link. it’s so embarrassing to show the error 404 page not found page.

Instead, we can show them some other page or redirect it directly to the homepage of the WordPress website.

this also leaves a bad impression and may create wrong results on the search results.

So, what we can do is just create a 301 redirection to avoid any penalties.
Its is also easy to setup this SEO friendly 301 Redirection.

Just Login to your WordPress admin >> Click >> Editor Under Appearance.This normally edits your current WordPress themes files.
Now >> click the 404.php file on the right top of the page and type the below code on it.

Delete any existing codes on it,  if needed you can copy and save it.

About ilangovan ramasamy

I am a IT manager on a Corporate co. Started My Career In a Internet Center. having 10 years on Experience on IT. Very much Interested in knowing New technologies & gadgets. Wrote many Articles & how to’s for Computer Related issues. As I am in to hosting industry We face many issues on work. I thought of sharing my knowledge with you and writing so. If you guys feel something is interesting & helpful, Please do comment on it.

View all posts by ilangovan ramasamy →

2 Comments on “How to redirect wordpress 404 pages to homepage with 301 for SEO”

  1. Pingback: Do you have a spam problem on this blog
  2. I use Akismet, Its simple free for some 80k comments check, just signup for a wordpress.com account and get a API to activate Akismet on your wordpress blog.

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.