What is 404 not found? How to solve 404 not found?

What is 404 not found? How to solve 404 not found?

For many novice website builders, when building a website, a 404 not found error suddenly appears. After a long time, they still have no idea what the problem is. Editor Feng Chao also encountered this problem when he was building a website before, but he solved it by consulting the information. Today, a friend suddenly asked me how to deal with the 404 not found error on the website? Let me review it again, what is 404 not found? How to solve 404 not found? Let’s take a look with Feng Chao from Dongguan Website Construction today!

What is 404 not found?

404 not found actually represents a 404 page. When a user is browsing a web page, the server cannot provide information normally, or the server cannot respond and the reason is unknown, so an error page is returned. The purpose is to tell the search engine that the page does not exist and no longer allow search engine crawlers to continue accessing this page!

Why does 404 not found appear? There are several reasons why 404 not found is triggered:

1. The user enters the wrong link address, causing IIS to prompt 404 not found.
2. The original page on the server has been deleted. This situation often occurs in large forums. In order to ensure the rational use of server resources, BBS forums will delete expired or very old information pages, resulting in 404 not found.
3. When users visit some foreign websites that are prohibited from access in China, the 404 not found phenomenon will appear. This requires the use of a proxy server for normal browsing.

How to solve 404 not found?

1. When a 404 not found error occurs due to a change in the web page content path, we can define a 404 error in IIS to point to a dynamic page, and use a 301 redirect in the page to jump to the new address. At this time, the server returns a 301 status code.

2. Design an HTML file and point 404 to the HTML file. The page will return a 404 status code.

Open IIS Manager-->Click the properties of the website for which you want to set a custom 404-->Click the Custom Error option-->Select the 404 page-->Select and open the edit properties-->Set to URL-->Fill in "/err404.html" in the URL-->Click OK to exit and then upload the err404.html page to the root directory of the website. Here, in "Message Type", be sure to select "File" or "Default Value" instead of "URL", otherwise, a "200" status code will be returned.

3. Direct 404 to a dynamic page

For example, if error.asp is not set in the page and only the HTML code of the prompt is returned, the page will return a 200 status code, which is incorrect. We can add the statement: Response.Status="404 Not Found" after displaying the prompt content to ensure that the page returns a 404 status code.

4. Set up 404 error page under Apache

The method of setting a 404 error page for Apache Server is very simple. Just add the following content to the .htaccess file: ErrorDocument 404 /notfound.php

People who read this article also read:

What are dead links? How to deal with dead links on the website?

What are some common problems you may encounter in website maps?

What is a wheel chain? What is the function of the wheel chain?

<<:  What is a wheel chain? What is the function of the wheel chain?

>>:  How to analyze if a website is penalized by Baidu?

Recommend

4 Strategies for Affiliate Marketing

Are your members really your members? Regarding a...

Deep Decoding | How to Avoid the “Pitfalls” of Influencer Marketing

Since the beginning of spring 2018, various inter...

Can Tik Tok Assistant help you become popular? What's the use?

The Douyin Assistant is in the Douyin APP. The wa...

How to make the African kids' happy birthday video?

Today, editor Feng Chao will explain to you how t...

How to operate a content topic and confirm the promotion channels?

A small content topic basically has the following...

Classic "Event Marketing" Cases You Must Know When Operating an App

Topic marketing and event marketing are unfathoma...