HUB
Sign inSign up

digitalcave/site-preflight

By digitalcave

•Updated 5 days ago

CLI that checks a website before launch: broken links, HTTPS, redirects, title, meta, sitemap

Image
0

356

digitalcave/site-preflight repository overview

⁠site-preflight

A small command line tool that checks a website before launch and prints a clear, plain report: broken internal links, HTTPS and HSTS, the http and www redirects, page title, meta description, mobile viewport, a noindex left over from staging, robots.txt, XML sitemap and an old copyright year in the footer.

Source code, issues and full documentation: github.com/digitalcaveuk/site-preflight⁠ (MIT licence). Tool page and guide: digitalcave.uk/tools/site-preflight⁠.

⁠Run with Docker

Build the image straight from the GitHub repository, then run it:

docker build -t site-preflight https://github.com/digitalcaveuk/site-preflight.git
docker run --rm site-preflight --url https://example.com

Or without Docker: pip install git+https://github.com/digitalcaveuk/site-preflight

⁠Options

OptionMeaning
--urlthe site to check (example.com works too, https is assumed)
--max-links Nhow many internal links from the home page to test (default 25, 0 skips the link check)
--timeout Sseconds to wait for each request (default 10)
--jsonprint the full report as JSON instead of text

The exit code is 1 if any check failed and 0 otherwise, so it fits in a CI pipeline or a deploy script.

⁠Example output

$ docker run --rm site-preflight --url example.com
site-preflight 0.1.0  https://example.com/
checked at 2026-11-25T13:05:37Z

[PASS] Home page            HTTP 200
[PASS] HTTPS                served over https
[WARN] HSTS header          no Strict-Transport-Security header
[FAIL] http:// to https://  http://example.com/ does not redirect to https (status 200)
[WARN] www / non-www        https://www.example.com/ serves a page but does not redirect to example.com (duplicate content)
[PASS] Page title           14 characters: Example Domain
[FAIL] Meta description     missing
[PASS] Mobile viewport      width=device-width,initial-scale=1
[PASS] Indexable            no noindex in meta robots or X-Robots-Tag
[WARN] robots.txt           not found (status 404)
[WARN] XML sitemap          no sitemap found at robots.txt, /sitemap.xml or /sitemap_index.xml
[INFO] Copyright year       no copyright notice found (or it is added by JavaScript)
[INFO] Internal links       no internal links found on the home page

5 passed, 4 warnings, 2 failed, 2 info
Not ready: fix the FAIL items before launch.

⁠What it checks

CheckWhat passes
Home pagereturns HTTP 2xx (redirects are followed and shown)
Internal linksup to --max-links links from the home page return 2xx or 3xx
HTTPS / HSTSserved over https with a Strict-Transport-Security header
Redirectshttp:// and the www or bare variant redirect permanently to the main URL
Title / meta descriptionpresent and a sensible length
Mobile viewportwidth=device-width viewport meta is present
Indexableno noindex in meta robots or the X-Robots-Tag header
robots.txt / sitemaprobots.txt exists and a sitemap is found
Copyright yearthe footer shows the current year

⁠Credits

Built by DigitalCave⁠, an all-in-one web design, SEO and digital marketing agency. If you need a site built properly from the start, see our web design service in Birmingham⁠.

Author: DigitalCave (Rocky V).

Tag summary

Content type

Image

Digest

sha256:4236cbfd3…

Size

21.5 MB

Last updated

5 days ago

docker pull digitalcave/site-preflight