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

The Complete List of MIME Types

What is MIME TYPE? 1. First, we need to understan...

Implementation of MySQL select in subquery optimization

The following demonstration is based on MySQL ver...

Web Design Tutorial (3): Design Steps and Thinking

<br />Previous tutorial: Web Design Tutorial...

How to realize vertical arrangement of text using CSS3

In a recent project, I wanted to align text verti...

How to encapsulate the table component of Vue Element

When encapsulating Vue components, I will still u...

How to quickly add columns in MySQL 8.0

Preface: I heard a long time ago that MySQL 8.0 s...

JavaScript adds prototype method implementation for built-in objects

The order in which objects call methods: If the m...

docker cp copy files and enter the container

Enter the running container # Enter the container...

Detailed explanation of commonly used nginx rewrite rules

This article provides some commonly used rewrite ...

How to write the parent and child directories of HTML relative paths

How to indicate the parent directory ../ represent...

Analysis of rel attribute in HTML

.y { background: url(//img.jbzj.com/images/o_y.pn...

JavaScript implementation of carousel example

This article shares the specific code for JavaScr...

Implementation of VUE infinite level tree data structure display

Table of contents Component recursive call Using ...

Example explanation of alarm function in Linux

Introduction to Linux alarm function Above code: ...

MySQL 5.7.21 installation and configuration method graphic tutorial (window)

Install mysql5.7.21 in the window environment. Th...