How to Build 404 page redirection

Source: Internet
Author: User

The core of SEO operations is intra-site optimization. The main content of intra-site optimization is to complete various details. -- Doing well in these details can play an unexpected effect on website rankings.

Today, the basic SEO operation details are the establishment of the 404 page.

We can find that good websites will carefully create 404 pages.

Even websites with no such details are trustworthy. Regardless of whether you are interested or not, users will question websites without 404 pages, especially search engines.

If you want the search engine to trust you, 404 page is the minimum requirement.

How to Create a 404 page?

The page content of the 404 page can be determined at will. You can find a famous website, save its 404 page as it, and modify the text above.

For example, http://www.zoolc.com/404.phpyou can modify the source text and upload it to your website root directory.

Note: On the 404 page, do not jump directly to the Home Page. Instead, the user is guided to click back to the home page. The consequence is that the homepage may be K.

How can I directly redirect an error link to the 404 page?

For almost all virtual hosts, the 404 page Jump function is provided. (If not, there is no way to do it. Unless the website program itself has the 404 feature)

Step 1: log on to the virtual host background. If you are a virtual host bought with hichina, log on to http://www.zoolc.com/and enter your user name and password on this website.

Similarly, the host you bought with xx will log on to its website.

Step 2: Find the host of the website you want to set, and enter the address of the 404 page in the correct setting of the 404 page. (Please look for it carefully. If it is not found, you have to ask if the space provider does not provide the 404 feature)

Can I put the statistics code on the 404 page?

Yes. In this way, we can also count how many people have accessed the 404 page.

404 is the anchor text on the page useful?

Useless. Because the 404 page search engine is not included. In general, we also suggested that the robots.txt file shields the 404 page.

If it is an independent server or you want to handle problems on the 404 page.

404 returns 302 and 200

1. custom 404 error pages are good practices for providing user experience, but the impact on search engines is often not noticed during the application process. For example: if the server configuration is incorrect, "200" status code is returned or the custom 404 error page uses Meta Refresh to return "302" status code. A correctly set custom 404 error page should not only be correctly displayed, but also return the "404" error code instead of "200" or "302 ". Although there is no difference between the HTTP status code "404" and "200" for the accessed users, this is very important for search engines.

When a search engine spider requests a URL address to get a "404" status response, it knows that the URL address has expired and no longer indexes the webpage, and report to the data center that the webpage indicated by the URL address is deleted from the index database. Of course, the deletion process may take a long time. When the search engine returns the "200" status, the url address is regarded as valid and will be indexed and indexed to the index database, the result is that the two different URLs have exactly the same content: the content of the custom 404 error page, which leads to the copy webpage problem. For search engines, especially Google, it is not only difficult to obtain the trust index TrustRank, but also greatly reduces Google's evaluation of website quality.

The custom 404 error pages of many websites are usually displayed in the following format: first, an error message is displayed, and then the page is redirected to the homepage, webpage map, or other similar pages of the website through Meta Refresh. Depending on the specific implementation method, this type of 404 page may return a "200" status code or "302", but either way, from the SEO technical perspective, is not a proper choice.

We have already talked about the "200" status, so what will the search engine do when "404" is returned on the 302 Page? Theoretically, for the "302" error, the search engine considers that the web page exists, but the address is changed temporarily and the page will still be indexed, duplicate text similar to the "200" Status Code may also occur. Second, mainstream search engines, represented by Google, are increasingly strict with 302 redirection, this type of improper use of 302 redirection poses a great risk.

Set Error 404 page in Apache

Setting the 404 error page for Apache Server is simple. You only need to add the following content to the. htaccess file:

ErrorDocument 404/notfound. php

Set Error 404 page under IIS/ASP.net

First, modify the application root directory settings, open the "web. config" file, and add the following content to it:

<Configuration>

<System. web>

<CustomErrors mode = "On" defaultRedirect = "error. asp">

<Error statusCode = "404" redirect = "notfound. asp"/>

</CustomErrors>

</System. web>

</Configuration>

Note: In the preceding example, "error. asp" is the default 404 page and "notfound. asp" is the custom 404 page. Modify the file name when using it.

Then, add the following content to the custom 404 page "notfound. asp:

<%

Response. Status = "404 Not Found"

%>

In this way, you can ensure that IIS returns the "404" status code correctly.

 

This article reprinted to http://www.magic-jungle.com/

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.