I wanted a small script that answers the questions a small-business site owner actually has:
is my page indexable, does it work on phones, are there broken links, is the title cut off in Google?
No API key, no headless browser, standard library only.
The checks are easy. Not reporting false problems is the hard part.
-
robots.txt groups. python.org's robots.txt contains
Disallow: /, but only inside the groups for a few old bots (HTTrack, puf, MSIECrawler, Nutch). TheUser-agent: *group blocks just two directories. A grep forDisallow: /would call the site blocked. The checker usesurllib.robotparserand asks the real question,can_fetch("Googlebot", url), with a test for that file shape. -
Soft 404s. Some static hosts answer every unknown path with the home page and HTTP 200, so
/robots.txtand/sitemap.xml"exist" but are HTML. The checker looks at content type and first bytes and reports "soft 404" instead of a green tick. -
<h1>A<br>B</h1>must readA B, notAB. Line-break and block tags add a space. -
Certificate errors on Windows Python look like "site unreachable". The checker uses
certifiwhen installed and says clearly when the cause is the local certificate store.
Every flagged item in a client report should be checked next to curl output before sending.
What it does not do: JavaScript-rendered pages, Core Web Vitals, backlinks. Say that up front.
It is one Python file with 61 tests against a local test server.
Built with help from Claude.
Top comments (0)