Website optimization how to make 404 pages and related considerations

Source: Internet
Author: User
Keywords Website SEO

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

A little bit SEO experience seo professionals know that 404 pages face the site has a role that can not be ignored, it undertook the site user experience and the burden of optimization. When a user accesses a page where the site does not exist or has been deleted, the server automatically returns a 404 error status. If not set 404 pages, when the access does not exist or deleted pages will appear dead links, not only detrimental to the user's experience, but also affect the search engine included.

How do I set up 404 pages in different situations?

2, the Apache server set 404 error page

Add code to the. htaccess file: ErrorDocument 404/error.html, create a simple html404 page naming error.html place error.html in the site root directory.

Note:

Do not turn 404 errors directly to the home page, which will lead to the home page is not included;/error.html before the main domain name, no person returned the status code is 302 or 200 status code.

3, Iis/asp.net set 404 error page

First, modify the settings for the application root directory and open the Web.config file editor, adding the following:

Note: In the above example, error.asp is the default 404 page of the system, notfound.asp is a custom 404 page, please modify the corresponding file name when using.

Then, in the custom 404 page notfound.asp, add:

Then, in the custom 404 page notfound.asp, add:

<%

Response.Status = 404 Not Found

%>

<%< p= "" >

Related Article

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.