IIS settings 404 page graphic tutorial (select URL or file)

Source: Internet
Author: User

The following Hou Qinglong describes some aspects of the 404 page code, I hope you can use the website construction: <META http-equiv = refresh content = "3; url = http://www.iglee.net/">, change the URL to your desired URL and webpage.

Provides the most practical and common code, which can be used in html, asp, and php to add the code to and. The Code is as follows:

Will 404 pages be cheated by search engines?

Answer: No, when a small part of your webpage disappears and you use 404 page Jump, the search engine will not consider cheating because this is in line with normal webpage rules, because no website can guarantee that the webpage will be permanently stored.

The 404 page is more beneficial to the user experience

When you delete and modify part of the content on the webpage due to a website revision, you can use 404 page redirection to effectively protect the original website traffic. When the website cannot be opened, if no 404 page is set, remind users not to lose the website image and improve user experience.

The beautification of the 404 page is also very important to improve the website image.

How to define settings on page 1

This is a commonly used method. You can consult your server provider to define it.

Step 1: Open IIS (internet Information Service ).

Step 2: select your website, right-click Properties, and click custom errors.

Step 3: Find "404" in the "http Error message" box, double-click it, or click "Edit attribute" to define the webpage address on page 404 of your website, this method is only applicable to friends who have server management rights, and other friends who buy space define settings. Could you tell me your server carrier.

The following 200 status is returned.

Iis asp 404 error page settings

Setting a static 404 error page is relatively simple. Right-click the website you want to manage in IIS manager to open the custom error information page in properties, set the error information page for "404. However, in "Message Type", you must select "file" or "Default Value" instead of "URL". Otherwise, the "200" status code will be returned.
Summary: No matter what server or 404 page settings, make sure that the status code returned by the server is 404. If this cannot be ensured, we recommend that you do not set the 404 error page for seo, do not kindly do bad things.

In Windows 2003, how does one set the 404 error page for IIS?

A common problem in SEO is that when the original url fails, the server returns the 404 error page. When we want this error page to retain the user and return the 404 error page, the specific operation method is as follows.

1. Correct IIS custom 404 error page

The procedure is as follows:

Open IIS Manager-> right-click the properties of the custom 404 website to be set-> click custom error options-> select in the http Error column and double-click 404 (edit attributes) -> Message Type: file-> browse to select the 404 page you want-> Save and exit

The error page takes effect.

However, in some 2003 systems, IIS cannot be set as above.

It turns out that the file access permission is a problem, as long as you set a custom error target page, such as 404.html to add the user's Everyone read permission.
Operation

Open the custom 404 error page in the directory where the webpage file is located, right-click Properties --> Security check whether the user Everyone is included. If no, add the user. Select "readable" in the permission, and then apply the permission.

1.1 test the custom 404 error page

Open the test URL in the browser: http://www.jb51.net/404. If you show your custom page and go through the test below, return Status: HTTP/1.1 404 Not Found.

Test web header information tool http://web-sniffer.net
HTTP (S)-URL: Enter the error URL to be tested, such as: http://www.jb51.net/404
Request type: Select HEAD
For other default values, click submit.

Ii. Incorrect 404 page setting method

Although the following method can display the custom 404 error page, the returned status code is 200, so it is incorrect:

Set message content to URL
Enter/404.htm in the URL
Put 404.htm under the root directory of the website.
You cannot directly modify the default 404 page.

Iii. Website status code reference:

In the article "view how search engine spider crawls your website through HTTP status code", I introduced some frequently-involved HTTP status codes and their meanings, for example, Http status codes that are frequently discussed and related to this article:
404: the server cannot find the specified resource and the requested webpage does not exist (for example, the webpage requested by the browser is deleted or moved, but it does not rule out the possibility that the link will be valid in the future );
410: the requested webpage does not exist (Note: 410 indicates permanent, and 404 indicates temporary );
200: the server returns the requested webpage;
301: Permanent URL redirection
302: Temporary URL redirection
The above method is applicable to servers set up in the iis environment of windows2003.

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.