In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge about "how to use shell script to submit website 404 dead chain to Baidu in batches". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Baidu webmaster platform provides dead chain submission tool, you can submit the site existence of dead chain (protocol dead chain, 404 pages), you can quickly delete dead chain, help website SEO optimization. It is too troublesome to manually fill in the dead chain files one by one. We advocate complex automation in our work, so in this article we share Apache services together through shell scripts to organize the dead chain of websites, which is convenient for us to submit.
The default is common, where we just need to add #comments before the common line, and then remove the #before the combined line. Then save and restart the Apache service.
Note: If you add multiple sites to your server and each site has a separate profile, we only need to set the CustomLog item in the profile of the corresponding site, for example:
vim /usr/local/apache/conf/vhost/www.chanzhi.org.conf ServerAdmin [email protected] DocumentRoot "/data/wwwroot/www.chanzhi.org" ServerName www.chanzhi.org ServerAlias chanzhi.org ErrorLog "/data/wwwlogs/www.chanzhi.org_error_apache.log" CustomLog "/data/wwwlogs/www.chanzhi.org_apache.log" combined SetOutputFilter DEFLATE Options FollowSymLinks ExecCGI Require all granted AllowOverride All Order allow,deny Allow from all DirectoryIndex index.html index.php
The following is the logging format of the website before and after configuration:
Before configuration:
When you use this script, you can adjust the path and fields according to your server situation, and then execute the script:
bash deathlink.sh
3. Submit Dead Chain
When executing the above script, it will generate a file containing all the 404 page links obtained in the specified directory, one line per link. For example:
https://www.linuxprobe.com/shell-apache.html
Baidu in the audit through, will have been included in the failure of links to delete, in order to avoid failure page links to the site caused adverse effects.
"How to use shell script batch submission website 404 dead chain to Baidu" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.