Customize 404 pages with Google Webmaster tools

Source: Internet
Author: User
Tags add

When a visitor to a Web site accesses a non-existent URL, a 404 error page appears, indicating that the specified page cannot be found on the server. When you encounter a 404 page, visitors may try to manually correct the wrong URL, or click the return button, or leave the site directly.

To make 404 pages more useful, Google once added the "Enhanced 404 page" tool to Webmaster tools, the language of which was in English, and now the tool has a Chinese version, Here I will explain in detail how to add this custom 404 error page As a Chinese site administrator.

First open Google Webmaster Tools, point "tools"-"Enhanced 404 page" To get Google's 404 code.

Then open Notepad and paste the following HTML code inside:

<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<meta http-equiv= "Content-language" content= "ZH-CN"/>
<title> File not found </title>
<body>
</body>

Then insert Google's 404 code in the middle of <body> and </body>.

Then, click "File"-"Save As" in "Notepad", select UTF-8 in "Encoding", and save as a file with an HTML suffix, such as "404.html"

Finally, the Web site configuration, for IIS, in the "Site Properties"-"Custom Error", modify the HTTP 404 error file for our new 404.html; for Apache, add a line to the. htaccess file ErrorDocument 404/ 404.html.

Now, when the site has a 404 error, Google will list a content on the Web page and an additional address that is most relevant to the "missing" page and provide a Google based search box.



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.