The severity and solution of the 404 status code returned on the custom 200 page in IIS

Source: Internet
Author: User

Before learning about the 404 page, let's take a look at several common HTTP status codes.
* 404: the requested webpage does not exist (it does not rule out the possibility that the link will be valid in the future );
* 410: the requested webpage does not exist (permanently );
* 200: the server returns the webpage successfully.
* 302: Temporary URL redirection (redirection)
* 301: Permanent URL redirection
* 403: Access Denied
* 500: Internal error

When you access a page that does not exist, a 404 status code is returned, telling the search engine that the page does not exist or has been deleted.
By default, when no custom 404 page is set, access to a page that does not exist is shown in

Such pages are unfriendly to users and search engines.
Next we will create a custom error page, as shown in:

There are several advantages for such a 404 page:
1. You can prompt that the page accessed by the visitor does not exist, rather than asking the visitor to see a wrong prompt.
2. guide visitors to other pages to reduce bounce rates

Are you very excited about the above results?

Slow down. Check the status code of the 404 page after completing the 404 page. Is it true that 404 or 200 is returned?
Can I renew it at this address?
For example, I will check the 404 status code on the shuoyan Technology website. The result is as follows:

We can see that the status code returned when we access the nonexistent page http://www.shuoyan.net/fdsfsdfis 404., which reaches our goal.
If you have made a custom error page and use the above tool to detect that the error page returns a 200 status code, you must contact the space provider for modification. Otherwise, the consequences will be very serious.

If your VM is IIS, there are two ways to set 404 as the corresponding error message page in IIS:

1. if you select the destination file, only the file ending with .html or HTM can be used. After IIS is executed, the status of 404 is automatically output.

Select a file for the message type, Click Browse in the file, and select your custom error page. As shown in:

Custom error page settings

2. If you select "url" for "Message Type", you must use the ASP file (because the 404 status can be set only in the ASP file ), otherwise, the 200 status code is returned when you access the error page.

You just need to set up the Space Provider.
If the custom 404 error page of a website does not return the "404" status code when the URL is invalid and is replaced with "200", what will happen? Obviously, search engines will think that this "nonexistent" webpage exists in the website, which will lead to many problems and affect the final Seo effect of the website.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.