Broken link(s) or death link(s) is a term that describes links to the hypertext that no longer exist on the Internet for some reason or other🙂. And most of us usually call it "404".
404 can be appear for many reasons but most commonly is webmasters forget to update links again when they change the address of hypertext. This is really not good for seo at all and search engines don't like it.
Check broken links with 404 error using Python tool
To check broken links with 404 error, you can use many different tools, but if you love python and terminal, you can try reading this article😋.
First, you must need install beautifulsoup4 python package:
pip install beautifulsoup4 -yIf you receive a error like this -bash: pip: command not found , you can run sudo apt install python-pip to fix it.
Now, run the following commands:
git clone https://github.com/yushulx/crawl-404
cd crawl-404
nano broken_links.pyRight now, you will be in text editor. Find text string like this:
request = build_request("http://kb.dynamsoft.com/sitemap.xml")and replace "http://kb.dynamsoft.com/sitemap.xml" with your sitemap address.Pressing Ctrl + O ,next Enter and next Ctrl + X to exit the text editor. After all, if you do not encounter any problems. Congratulations, you have completed 99% of the work. Now, run this command and Crawl-404 python tool will find all broken links for you.
python broken_links.pyIf you want to stop, use Ctrl+c