A brief analysis of the issues that should be paid attention to when making 404 error pages

A brief analysis of the issues that should be paid attention to when making 404 error pages

When optimizing a website, we must learn to use error pages. For example, a 404 error page may appear on our website. Here are some issues that should be noted when making a 404 error page:

1. Do not display a 200 status code on the 404 page you create

When the page a user visits does not exist, it is normal for the server to return a 404 error status code. Some webmasters set up 404 pages, and when visiting these non-existent pages, the server returns a 200 status code. In this way, the search engine will treat these error pages as a large number of duplicate pages, which is not conducive to website optimization. In addition, it is best not to use 301 redirect to jump the error 404 page directly to the home page, otherwise the search engine will think that there are a large number of pages on the website with the same content as the home page. In addition, it is best not to use jumps less than 10 seconds, such as JS or meta refresh, otherwise the search engine will think that these error pages are normal. When setting up a 404 error page, the most basic requirement is not to return the error page to a normal 200 status code.

2. Make the 404 page beautiful and practical

When users search for or visit a non-existent URL, they will feel anxious. If the 404 page is the default or a very unfriendly user experience page, the user will close it without hesitation. Therefore, when setting the 404 page, it should be beautiful and practical overall.

First, let the user know that the page they are visiting does not exist. Clearly remind the user what website they are visiting. Then give the user a reasonable suggestion and set up some practical or popular links so that users can visit other pages of your website through the links. This process may seem very subtle, but it is possible to retain a user.

Therefore, whether we are building a website or optimizing it, we should strive for perfection within our capabilities.

It is usually not easy for us to detect 404 pages, but we can use tools to achieve it. The specific method is also very simple. Using Google administrator tools will display some 404 error pages. These pages are crawled by spiders because of the existence of external links. If we often find these pages, we can contact the other party’s website administrator to ask them to correct it. If the correction is too difficult, then you can make a corresponding URL page and write the content you want users to access on it. This method is a trick to cleverly use the wrong URL to increase external links. Of course, the above only applies to URLs that often have 404 status codes. Not all error URLs are worth doing this. You can do it according to your own situation.

<<:  Detailed explanation of using the at command for one-time scheduled tasks in Linux

>>:  HTML basic summary recommendation (text format)

Recommend

Examples of some usage tips for META tags in HTML

HTML meta tag HTML meta tags can be used to provi...

Detailed tutorial on deploying apollo with docker

1. Introduction I won’t go into details about apo...

Vue implements verification code countdown button

This article example shares the specific code of ...

A brief introduction to MySQL storage engine

1. MySql Architecture Before introducing the stor...

The leftmost matching principle of MySQL database index

Table of contents 1. Joint index description 2. C...

CentOS 7.6 installation of MySQL 5.7 GA version tutorial diagram

Table of contents Environment Preparation Environ...

WeChat applet implements sorting function based on date and time

I recently took over a small program project, and...

Detailed tutorial on installing mysql 8.0.13 (rpm) on Centos7

yum or rpm? The yum installation method is very c...

Example of how to create a local user in mysql and grant database permissions

Preface When you install MySQL, you usually creat...

Javascript to achieve the effect of closing advertisements

Here is a case study on how to close ads using Ja...

How to Set Shortcut Icons in Linux

Preface Creating shortcuts in Linux can open appl...

Summarize some general principles of web design and production

<br />Related articles: 9 practical suggesti...

Tips for data statistics in MySQL

As a commonly used database, MySQL requires a lot...