Article classification: search engine basic principle introduction collection

B station video tutorial portal

Using Chrome to view and simulate the network request UserAgent is a basic knowledge of SEO, which can easily check the response of a URL under different UA:

  • Different devices – PC and mobile
  • Different users – real users vs. crawlers

View the network request UA steps

1. Open a new TAB in Chrome, press F12 to enter debugging mode, and click Network in the function bar.

2. In the Chrome address bar, enter the url, such as www.baidu.com, to access the UserAgent. You can see that Chrome initiates multiple network requests.

The user-agent: Mozilla / 5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36Copy the code

Switching debugging equipment

Sometimes we need to use Chrome to see how some web pages look on mobile. Do this:

Click on the red box in the picture to switch to a mobile device.

Now the UA becomes:

The user-agent: Mozilla / 5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1Copy the code

Switch to a PREDEFINED UA in Chrome

To switch to a PREDEFINED UA of Chrome, perform the following two screenshots.

After checking, refresh the page and check the UA of the network request again. You will find that the UA has changed.

Use Chrome custom UA, disguised as Baidu crawler

According to this article search engine crawler UA daquan record of baidu crawler UA, fill in the following position, OK.

If the server of the target site does not verify the IP of the network request, then masquerading Baidu crawler succeeded!