Sometimes the website is hacked or revised, resulting in a lot of messy dead links. Baidu has included a large number of them, which has a special impact SEO
Baidu There is a dedicated dead link submission portal, which can be deleted in batches, but we cannot fill in and submit one website at a time
At this time, we need a method that can detect and export the dead chain in batches, so that we can submit it to Baidu at one time.
Here we recommend a small tool, Xenu1.3.8
Of course, this tool is only the first step. We need to use this tool to query all the included pages, export a bunch of data, and then extract rules.
Step 1:
Step 2:
Open the software and fill in the simple Baidu site address. The reason for using the simple version is that it can reduce the time and content of link queries. (Please change hongdouh.cn to your website)
//www.baidu.com/s?ie=utf -8&tn=baidulocal&wd=site%3Ahongdouh.cn

Click [Start Check] at the bottom and wait for all connections to be queried

Of course, because the dead link of this site has been submitted for deletion, the results here are all OK and green. If there is a dead link, it will be displayed in red.
It doesn't matter. You can look at your results. Next, we export a bunch of TXT data

Exports are randomly named and stored on the desktop or somewhere. It will be processed later. Because the data inside also includes other Baidu links,
We need to extract regularly through the PHP program. Here I saved it as idedecms.txt to the desktop

Next, create a new php file and copy the code as follows:
<? php
header("Cintent-type: text/html; charset=utf-8");
$file=$_GET["file"];
$head=" //hongdouh.cn ";
$state="404";
preg_match_all("/".str_replace("/","/",$head). "(.*?)s".$ state. "/i",file_get_contents($file),$result);
foreach($result[1] as $row){
echo $head.$ row. " ";
}?>
You need to //hongdouh.cn Change to your URL and save it as a. php file
It is named 404url.php here
Then upload the previously exported idedecms.txt and 404url.php files to the root directory of the website.
Idedecms.txt is a stack of link data that we just exported with the tool
404url.php is used to process this pile of data and extract all 404 status links from your website.
After these two files are uploaded. We enter in the browser address bar
//hongdouh.cn/404url.php?file=idedecms.txt
Then you will list all the dead links included in your website. You only need to save it as a txt document. Just submit it to Baidu.
Or you don't have to save it. Directly put //hongdouh.cn/404url.php?file=idedecms.txt
This link can be submitted to Baidu.
Baidu submission entry:
I have packed the Xenu tools and 404url.php that I need
Download address:
Ok, this is the end of the tutorial. If you don't understand something, you can discuss it in groups.
Statement: All articles on this site, unless otherwise specified or marked, are originally published on this site. No individual or organization is allowed to copy, embezzle, collect and publish the content of this website to any website, book and other media platforms without the consent of this website. If the content of this website infringes upon the legitimate rights and interests of the original author, please contact us for handling.