How to Redirect Your 404 Page to the Home Page in WordPress

The way to Redirect Your 404 Web page to the Dwelling Web page in WordPress

Do you wish to redirect your 404 web page to your own home web page in WordPress?

Redirecting the 404 ‘Not Discovered’ web page to your web site’s residence web page can assist scale back your bounce fee and permit your customers to find different helpful content material in your web site.

On this article, we’ll present you easy methods to redirect your 404 web page to your own home web page in WordPress.

Why Redirect Your 404 Web page to Your WordPress Dwelling Web page?

When a consumer tries to go to a web page that doesn’t exist in your WordPress web site, WordPress will present them a 404 error web page as a substitute.

The wording and look of this web page can differ relying on the theme you might be utilizing.

Default WordPress 404 page

Most customers who land on the default 404 web page will go away your website rapidly. This could enhance your total bounce fee and negatively impression your search engine rankings.

That’s why it is best to take the time to create a customized 404 web page. Nonetheless, till you do this, you may take the shortcut on this tutorial and redirect customers to the homepage.

In an ideal world, you’ll additionally redirect particular 404 error requests to essentially the most related pages.

That being stated, let’s take a look at easy methods to redirect all 404 errors to your own home web page. We are going to cowl two strategies and in addition present you easy methods to create customized redirects for particular person pages:

Methodology 1: Redirect All 404 Errors to the Dwelling Web page in WordPress

For this methodology, we will likely be utilizing All in One Search engine marketing for WordPress (AIOSEO). It’s the finest WordPress Search engine marketing plugin that permits you to arrange redirects, optimize your content material for engines like google, and extra.

The very first thing that you must do is set up and activate All in One Search engine marketing (AIOSEO). For extra particulars, see our step-by-step information on easy methods to set up a WordPress plugin.

Notice: There’s a free model of All in One Search engine marketing, however we will likely be utilizing the Professional model since Redirect is a Professional addon.

As soon as the plugin is activated, that you must go to All in One Search engine marketing » Redirects.

For those who haven’t arrange redirects but, then you will need to click on the ‘Activate Redirects’ button.

Activating Redirects in All in One SEO

This may set up All in One Search engine marketing’s Redirects module.

Subsequent, you have to to click on on the ‘Settings’ tab on the high of the web page. This web page permits you to configure redirects in AIOSEO.

The AIOSEO Redirects Settings Page

You must scroll down the web page till you discover the ‘Superior 404 Settings’ part. Allow this part by merely clicking the toggle button in order that it turns blue.

Now it is possible for you to to see some extra settings. It’s best to toggle the ‘Allow default 404 redirect’ button to the on place. After that, guarantee that the ‘Dwelling Web page’ possibility is chosen.

Enabling Default 404 Redirect in AIOSEO

Discover that there’s additionally a ‘Customized URL’ possibility. This lets you redirect 404 errors to any submit or web page. Don’t neglect to click on the ‘Save Adjustments’ button on the high or backside of the web page to retailer your settings.

Now when your guests attempt to go to a URL in your web site that doesn’t exist, they are going to be taken to the house web page as a substitute of seeing the default 404 web page.

Methodology 2: Redirect All 404 Errors to the Dwelling Web page Utilizing Code

For those who want to not use a plugin, then you should use a easy code snippet to redirect all 404 pages to the homepage.

On this methodology, that you must add code to your WordPress information. For those who haven’t achieved this earlier than, then see our newbie’s information on pasting snippets from the net into WordPress. You may additionally prefer to see our information to the WordPress theme template hierarchy.

First, you have to to create a brand new file in your WordPress theme folder and title it 404.php. In case your theme already has a 404.php file, then you will need to edit that file as a substitute.

To edit this file, that you must hook up with your WordPress internet hosting account with an FTP consumer or their file supervisor device.

FTP 404 php file

As soon as you might be related to your web site, it is possible for you to to see the 404.php file in your WordPress themes folder.

You must add the next code as the primary line in your 404.php file:

header(“HTTP/1.1 301 Moved Completely”);
header(“Location: “.get_bloginfo(‘url’));

Subsequent, save the 404.php file and reupload it to your theme listing utilizing FTP or your internet hosting management panel.

Now, when a web page shouldn’t be discovered, as a substitute of seeing a 404 web page, guests will likely be redirected to your WordPress residence web page.

Bonus: Set Up Customized 404 Web page Redirects With AIOSEO

The perfect and most Search engine marketing-friendly means of dealing with 404 errors is to redirect guests to essentially the most related web page, not simply your homepage.

The All in One Search engine marketing plugin’s Redirects function also can monitor all 404-page errors and allow you to arrange good 404-page redirects in WordPress.

For those who put in and activated AIOSEO once you adopted Methodology 1, then all that you must do is navigate again to the All in One Search engine marketing » Redirects web page and click on on the ‘Settings’ tab.

Subsequent, scroll down till you see the ‘Logs’ part. Your 404 logs are a file of URLs that your guests have tried to make use of to go to pages that not exist in your website.

Be sure that the ‘404 Logs’ is toggled on in order that it seems to be blue. You may as well select how lengthy you need the plugin to file your logs by choosing the time interval from the dropdown menu.

Enable 404 logs

Don’t neglect to click on ‘Save Adjustments’ earlier than transferring on.

After that, you may click on the ‘404 Logs’ menu choice to see the final accessed 404 web page.

Keep in mind, because you simply enabled logging, it could not show something straight away. You may want to attend as much as 24 hours earlier than you see any helpful insights there.

Click 404 logs menu option

The ‘URL’ column will present you the pages customers tried to go to however don’t exist.

You’ll be able to redirect any of those URLs to an present web page by clicking the ‘Add Redirect’ hyperlink within the ‘Redirect’ column. This may open a dropdown the place you may enter your redirect info.

For finest outcomes, that you must enter essentially the most related web page for the unique question within the ‘Goal URL’ field after which click on ‘Add Redirect’.

Add home page redirect

For instance, if you happen to deleted a tutorial on easy methods to begin a WordPress weblog after which wrote a brand new one, then it’s finest to redirect that previous URL to the brand new weblog submit somewhat than your homepage.

So as to add a number of 404-page redirects, merely observe the identical steps as above.

Keep in mind, usually, you don’t wish to redirect your 404 web page to your own home web page without end. It’s an amazing short-term resolution till you create a customized 404 web page design that can convert higher or arrange particular person redirects that take customers to a related web page that does exist.

We hope this text helped you discover ways to redirect your 404 web page in WordPress. You may additionally wish to see our final WordPress Search engine marketing information and the very best drag-and-drop WordPress web page builders to create customized 404 pages.

For those who favored this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You may as well discover us on Twitter and Fb.

댓글 달기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다