Contains paid Promotion

Advertisement
Advertisement

Fix Error 404 on your WordPress website

As a website operator, you want to provide your visitors with an undisturbed and error-free surfing experience.

There is actually nothing more annoying than if sometime so-called dead links, e.g. In the creation phase, caused by faulty backlinks from other websites, by deleted files and images, etc., which guide the user to the infamous 404 error page.

Often the visitor then gets to see a page that has nothing to do with the layout (which actually runs like a red thread through the page), but a hint page with the entire sitemap, which displays all subpages. And maybe even a search box where you can enter search terms.

300x250
Anzeige

Now it is on the one hand so that one has also created subpages, which are not accessible via the normal navigation, and it should not be, since they should be displayed only after a certain action (for example, newsletter subscribed).

But what’s worse than the disturbed user experience is the impact of broken pages on your ranking on Google.

How to work around the error 404 and set up your own landing page under WordPress you will find in our article

Fehler 404 beheben
Anzeige

Fix Error 404 on your WordPress website

As a website operator, you want to provide your visitors with an undisturbed and error-free surfing experience.

There is actually nothing more annoying than if sometime so-called dead links, e.g. In the creation phase, caused by faulty backlinks from other websites, by deleted files and images, etc., which guide the user to the infamous 404 error page.

Often the visitor then gets to see a page that has nothing to do with the layout (which actually runs like a red thread through the page), but a hint page with the entire sitemap, which displays all subpages. And maybe even a search box where you can enter search terms.

300x250
Anzeige

Now it is on the one hand so that one has also created subpages, which are not accessible via the normal navigation, and it should not be, since they should be displayed only after a certain action (for example, newsletter subscribed).

But what’s worse than the disturbed user experience is the impact of broken pages on your ranking on Google.

How to work around the error 404 and set up your own landing page under WordPress you will find in our article

Fehler 404 beheben
Anzeige

1. How many error pages do I have?

1. How many error pages do I have?

The easiest way to find out from the Google Search Console is if and how many error pages have gotten your way. Anyway, the Google Search Console is a valuable tool to find out if there are page structure errors, and much more besides: proactively submit your own sitemap, search analysis, crawl errors, links to your website, etc.

Therefore you should not neglect them in any case.

See picture: (click to enlarge)

Google Search Console
Santander BestCredit Ratenkredit 300x250
Anzeige

The easiest way to find out from the Google Search Console is if and how many error pages have gotten your way. Anyway, the Google Search Console is a valuable tool to find out if there are page structure errors, and much more besides: proactively submit your own sitemap, search analysis, crawl errors, links to your website, etc.

Therefore you should not neglect them in any case.

See picture: (click to enlarge)

Google Search Console
Santander BestCredit Ratenkredit 300x250
Anzeige

2. How does error 404 affect my ranking?

2. How does error 404 affect my ranking?

The endeavor of Google is to provide users with the most relevant results in terms of their inputs. Exactly this fact has led Google today by a long way to any other market leader among the search engines.

So, if you change the URL of one of your pages, delete it (it also affects images and files), the URL to that content will still be in the index, and Google will also serve that link with a query.

Lemonade Hausratversicherung
Anzeige

If a user now clicks on the link, and ultimately ends up on a typical 404 page, then this is unsatisfactory for everyone involved.

  • The user does not get the result he expected
  • Google could not provide the user with a relevant result
  • For the site operator, it is also not desirable the visitor did not find what was wanted

Of course, the ranking of your page is not immediately devalued just because here and there once an error page has crept.

But important is that you react here in any case, and proactively look into the Search Console to determine if, where, and how many errors have crept in.

If such error pages accumulate over time and over a longer period of time, your page will certainly be devalued in the relevance of search queries. You may also want to proactively submit an updated Sitemap through Google Search Console.

Anzeige

The endeavor of Google is to provide users with the most relevant results in terms of their inputs. Exactly this fact has led Google today by a long way to any other market leader among the search engines.

So, if you change the URL of one of your pages, delete it (it also affects images and files), the URL to that content will still be in the index, and Google will also serve that link with a query.

Lemonade Hausratversicherung
Anzeige

If a user now clicks on the link, and ultimately ends up on a typical 404 page, then this is unsatisfactory for everyone involved.

  • The user does not get the result he expected
  • Google could not provide the user with a relevant result
  • For the site operator, it is also not desirable the visitor did not find what was wanted

Of course, the ranking of your page is not immediately devalued just because here and there once an error page has crept.

But important is that you react here in any case, and proactively look into the Search Console to determine if, where, and how many errors have crept in.

If such error pages accumulate over time and over a longer period of time, your page will certainly be devalued in the relevance of search queries. You may also want to proactively submit an updated Sitemap through Google Search Console.

Anzeige

3. What is a 404 soft error?

3. What is a 404 soft error?

A soft 404 error returns a page from a URL on your site that says the page does not exist. In addition, a 200 code (success) is sent to the browser. In some cases, instead of a “Not Found” page, you’ll see a page that has little or no usable content, such as an almost empty or completely blank page.

Source: Google

300x250
Anzeige

Why is that important?

It does not make sense to return a success code instead of 404/410 (Not Found / Gone) or 301 (Moved permanently). For a passcode, search engines will receive the information that a real page exists under this URL, so the page may appear in the search results. In addition, search engines continue to try to crawl this nonexistent URL instead of spending time crawling your real pages.

Source: Google

What should I do?

If your page is no longer available and there is no clear substitute, 404 (Not Found) or 410 (Gone) should be returned. These codes give browsers and search engines clear information that the page does not exist. You can also show a user-defined 404 page for the user. For example, a list of your most visited pages or a link to your homepage.
If your page has moved or there is a unique replacement, please return 301 (Moved permanently) to redirect the user accordingly.

With fetch like Google or other tools available on the web, you can check if your URL returns the correct code.

Source: Google

Anzeige

A soft 404 error returns a page from a URL on your site that says the page does not exist. In addition, a 200 code (success) is sent to the browser. In some cases, instead of a “Not Found” page, you’ll see a page that has little or no usable content, such as an almost empty or completely blank page.

Source: Google

300x250
Anzeige

Why is that important?

It does not make sense to return a success code instead of 404/410 (Not Found / Gone) or 301 (Moved permanently). For a passcode, search engines will receive the information that a real page exists under this URL, so the page may appear in the search results. In addition, search engines continue to try to crawl this nonexistent URL instead of spending time crawling your real pages.

Source: Google

What should I do?

If your page is no longer available and there is no clear substitute, 404 (Not Found) or 410 (Gone) should be returned. These codes give browsers and search engines clear information that the page does not exist. You can also show a user-defined 404 page for the user. For example, a list of your most visited pages or a link to your homepage.
If your page has moved or there is a unique replacement, please return 301 (Moved permanently) to redirect the user accordingly.

With fetch like Google or other tools available on the web, you can check if your URL returns the correct code.

Source: Google

Anzeige

4. Creating a 404 error page

4. Creating a 404 error page

Under WordPress, it is actually relatively easy, since a 404.php file is already implemented as standard here. These can be found in the dashboard under:

“Design” – “Editor” and then on the right side search the entry “404.php”

Here you can freely edit the source code and customize it to your own needs.

See picture: (click to enlarge)

404 Seite in WordPress

Note:
It would not be enough that you simply create a page under WordPress and give it a 404 note.

Because it is crucial that the server confirms the correct status code 404, and not the code 200 (all OK). This causes the previously described 404 soft errors.

Under WordPress, it is actually relatively easy, since a 404.php file is already implemented as standard here. These can be found in the dashboard under:

“Design” – “Editor” and then on the right side search the entry “404.php”

Here you can freely edit the source code and customize it to your own needs.

See picture:

404 Seite in WordPress

Note:
It would not be enough that you simply create a page under WordPress and give it a 404 note.

Because it is crucial that the server confirms the correct status code 404, and not the code 200 (all OK). This causes the previously described 404 soft errors.

Lemonade Hausrat
Anzeige

5. Create a 404 redirect via htaccess

5. Create a 404 redirect via htaccess

The htaccess file is a configuration file that you can use to control a variety of options (such as access control, redirects, browser caching, gzip compression, and more).

If you do not yet have an htaccess file on your web server, you must create it and enter it into your webspace either directly from your provider’s website (most of them offer FTP access via the web browser) or with a corresponding program such as Filezilla in the main directory Upload.

How to create an htaccess file:

  • Open a blank text document
  • Paste the following code: ErrorDocument 404 http://www.MyDomain.com/MyError Page/404.php (where you can customize My Domain and MyError
  • page to suit your needs)
  • Enter “.htaccess” as file name and save it under “all files” (not as .txt file!)

See picture: (click to enlarge)

htaccess Datei erstellen
kautionsfrei.de
Anzeige

The htaccess file is a configuration file that you can use to control a variety of options (such as access control, redirects, browser caching, gzip compression, and more).

If you do not yet have an htaccess file on your web server, you must create it and enter it into your webspace either directly from your provider’s website (most of them offer FTP access via the web browser) or with a corresponding program such as Filezilla in the main directory Upload.

How to create an htaccess file:

  • Open a blank text document
  • Paste the following code: ErrorDocument 404 http://www.MyDomain.com/MyError Page/404.php (where you can customize My Domain and MyError
  • page to suit your needs)
  • Enter “.htaccess” as file name and save it under “all files” (not as .txt file!)

See picture:

htaccess Datei erstellen
kautionsfrei.de
Anzeige

6. Create a 404 redirect via Plugin

6. Create a 404 redirect via Plugin

Of course, the easiest way is to use a plugin, which is now available in an almost unmanageable size. As a small decision-making aid, I can advise you to pay attention to this:

  • The plugin is compatible with your WordPress version
  • There are as many active installations as possible
  • It has a premium version, which has also (importantly) received updates lately. (This is also important for security reasons)
  • As many good reviews as possible
Anzeige

We recommend the following plugins from our point of view:

Redirection
All 404 Redirect to Homepage
404page
404 to 301

Such plugins not only relieve you of the work related to the htaccess file, but above all (at least in the premium versions) offer a multitude of possibilities:

  • Find errors on your pages
  • A reporting on how often a redirect in the past from which erroneous URL’s took place
  • Partial individual redirection of specific error pages to individual valid pages

Especially the last point can sometimes make sense, for example, if you operate an online store, and a previously existing product was replaced by a newer (with a new URL), the customer can be referred to the new product, instead of coming to an error page.

Of course, the easiest way is to use a plugin, which is now available in an almost unmanageable size. As a small decision-making aid, I can advise you to pay attention to this:

  • The plugin is compatible with your WordPress version
  • There are as many active installations as possible
  • It has a premium version, which has also (importantly) received updates lately. (This is also important for security reasons)
  • As many good reviews as possible
Anzeige

We recommend the following plugins from our point of view:

Redirection
All 404 Redirect to Homepage
404page
404 to 301

Such plugins not only relieve you of the work related to the htaccess file, but above all (at least in the premium versions) offer a multitude of possibilities:

  • Find errors on your pages
  • A reporting on how often a redirect in the past from which erroneous URL’s took place
  • Partial individual redirection of specific error pages to individual valid pages

Especially the last point can sometimes make sense, for example, if you operate an online store, and a previously existing product was replaced by a newer (with a new URL), the customer can be referred to the new product, instead of coming to an error page.

Become Guest Writer

We publish your guest contribution free of charge in German and English
incl. backlink to your website and identification of the author

Anzeige
Blogverzeichnis Bloggerei.de

Monthly Bestseller Charts:

About the author:

Michael Suhr
Michael SuhrWebdesigner / Economist
After 20 years in logistics management, I have been working as a freelance web designer and office trainer since the beginning of 2015. Incidentally, I give tips and tricks for more digital skills in my blog as time permits.

Search by category:

Anzeige

About the author:

Michael Suhr
Michael SuhrWebdesigner / Economist
After 20 years in logistics management, I have been working as a freelance web designer and office trainer since the beginning of 2015. Incidentally, I give tips and tricks for more digital skills in my blog as time permits.

Search by category:

Anzeige