Find Broken Links with WGET

Advertisement

In this article, we will see how to use Wget to find broken links from the website.

Try the below example command which generates the wget.log it lists all the broken links.

  1. Download & Install wget
  2. Add the installation directory to PATH:
    C:\Program Files (x86)\GnuWin32\bin

Syntax: Syntax:

wget -o wget.log -r -l 10 --spider http://example.com

Top ↑

Usage: Usage:

wget -o wget.log -r -l 10 --spider https://maheshwaghmare.wordpress.com --no-check-certificate

Top ↑

Output: Output:

Spider mode enabled. Check if remote file exists.
--2018-06-29 10:11:59-- https://maheshwaghmare.com/
Connecting to maheshwaghmare.wordpress.com|192.0.78.12|:443... connected.
WARNING: cannot verify maheshwaghmare.wordpress.com's certificate, issued by `/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2':
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `maheshwaghmare.wordpress.com/index.html'

0K .......... .......... .......... .......... .......... 318K
50K .......... .......... .......... .......... .......... 80.5K
100K .......... .......... .......... .......... .......... 664K
150K .......... .......... .......... .......... .......... 2.07M
200K ..... 5.80M=0.9s

2018-06-29 10:12:01 (234 KB/s) - `maheshwaghmare.wordpress.com/index.html' saved [210113]
%d bloggers like this: