Check if the website is included
First, we can enter site:域名
to see whether the domain is indexed by search engines, as shown below, represents not included:
Baidu resource platform add website
Visit the official website of Baidu search resource platform , register or log in to your Baidu account, and select [User Center]-[Site Management] to add your website. When adding a site, you will be asked to select the protocol header (http or https). If you select https, It will verify your site and it can be completed in about a day. My website has implemented full-site https, so I chose the https protocol.
After that, you will be asked to verify the ownership of the website, providing three verification methods:
-
File verification: download the given file, put it in the source folder of the local theme directory, and then deploy it to complete the verification
-
Generally give a meta tag into the home: HTML tag verification
与
to complete verification between labels -
CNAME verification: I personally think this method is the easiest, go to the domain name DNS and add a CNAME record to complete the verification
Personally recommend the third method, the first and the second do not know why the error 301 is reported.
Since the identity verification has been passed, the picture below is an online picture.
Submit to Baidu for inclusion
After successfully passing the verification, submit the URL to Baidu for inclusion. Baidu provides two methods of automatic submission and manual submission. Automatic submission is divided into three methods: active push, automatic push and sitemap. The following is the official explanation:
- Active push: the fastest way to submit, it is recommended that you immediately push the new links generated on the site to Baidu through this method to ensure that the new links can be included in Baidu in time
- Automatic push: It is a lightweight link submission component that places the automatically pushed JS code in the source code of each page of the site. When the page is accessed, the page link will be automatically pushed to Baidu, which is conducive to the faster discovery of new pages by Baidu
- Sitemap: You can periodically put website links in the sitemap, and then submit the sitemap to Baidu. Baidu will periodically crawl and check the sitemap you submit, and process the links in it, but the indexing speed is slower than active push
- Manual submission: If you don’t want to submit through the program, you can use this method to manually submit the link to Baidu
I use
sitemap
First we have to use the following command to generate a site map:
npm install hexo-generator-sitemap --save
npm install hexo-generator-baidu-sitemap --save
Here also note the root directory of _config.yml
the file, about line 17, url changed in the domain Baidu webmaster platform to add, that is, your site's home page address:
# URL
url: https://www.mo-yang.top
root: /
permalink: :year/:month/:day/:title/
Then use the command hexo g -d
to deploy the site up, and then access 你的首页/sitemap.xml
or 你的首页/baidusitemap.xml
you can see the site map.
Where the sitemap.xml
file is a common search engine sitemap file, baidusitemap.xml
is dedicated Baidu sitemap file
For example, mine is: https://mo-yang.top/baidusitemap.xml or
https://mo-yang.top/sitemap.xml
Then go to the sitemap submission page of the Baidu webmaster platform and submit your sitemap address. If it is successful, the status will be displayed as normal. The initial submission will take a few minutes. Compared with baidusitemap.xml, sitemap.xml has a waiting time. It will be longer. If you have new articles or other pages on your blog in the future, you can click to manually update the file to update the new sitemap
Reprinted to https://zhuanlan.zhihu.com/p/100922816