Solve the dilemma of page design and search engine optimization

Source: Internet
Author: User
Tags exit header
Solve | design | Search Engine | page | Optimized design beautiful Web pages are often complex, but search engines do not know how to appreciate beautiful web pages, just like the code to refine the page, which formed a page design and search engine optimization dilemma.

To solve this dilemma is very simple, as long as the search engine to provide different content on it.

The implementation method is to identify the search engine, and then send specific information.

There are two ways to identify search engines, excluding common browsers and direct identification of search engines, here I use the second method to identify some of the search engines.

There are a number of ways to send a specific information industry, including generating specific information code in the current page, or jumping. I choose to jump, so as not to confuse the page.

Asp3.0 gave us a new way to jump: Server.Transfer. Others like Response.redirect,:<meta Http-equiv=refresh content= "0; url=****** "> will produce two calls, which can take a long time, and the search engine may not support such jumps, or do not allow such jumps." Server.Transfer a bit like include, directly to the target page to take the code in place of the current page execution, the client appears to call only once, is the execution of the current page. However, Server.Transfer only support the relative path of the jump, can not jump to other sites! The content of the jump page is also limited to ASP and HTML.

After testing, I found that the Response.Redirect status code is 302, and the Meta method status code is 200, it is by browser jump.
301 are permanent redirects, and 302 are temporary redirects. 302 According to Google's principle is not long-term use, the content of the jump will not be adopted.

ASP and PHP 301 Redirect method:


Asp:
Response.status= "Moved Permanently"
Response.AddHeader "Location", "http://www.yoursite.com/"
Response.End
Php:
Header ("http/1.1 moved Permanently");
Header ("location:http://www.yoursite.com/");
Exit ();

Simple implementation of Server.Transfer method


Agent=request.servervariables ("Http_user_agent")
' Identify search engines '
Dim Botlist,i,issearch
Botlist= "Google,isaac,surveybot,baidu,ia_archiver,p.arthur,fast-webcrawler,java,microsoft-atl-native, Turnitinbot,webgather,sleipnir,yahoo,3721,yisou,sohu,openfind,aol "
Botlist=split (Botlist, ",")
For i=0 to UBound (botlist)
If InStr (Agent,botlist (i)) >0 Then
Server.Transfer "Simple.asp"
Issearch=true
Exit for
End If
Next

As long as the optimized page can be generated in the simple.asp, the optimized page can be as simple as possible, and can even be completely different content.

Using this method we can also do other things, such as Google AdSense. Google AdSense will grab the page, Analysis page content to give you the appropriate ads, when the Web page information is not focused, Google AdSense will give you public service ads. We can turn the AdSense bot to our definition of the content to cheat ads, and even cheat higher advertising! But I don't know if it will affect Google's search results.



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.