PageSourceSearch

https://justseo.ai/assets/BrokenLinkCheckerPage-DOD-gSWw.js

js justseo.ai collected 2026-10-05 15:37:12 UTC 7,739 bytes, 1 lines download raw bytes

1import{j as e,r as a,I as L,B as q,h as R,o as l,H as S,J as U}from"./index-B8rUhg3D.js";import{T as C,t as N}from"./ToolLanding-ohQZICU6.js";import{T as E}from"./ToolUpsell-BXBY2H8B.js";import{g as I}from"./seoTools-C2Mr3d19.js";import{u as B}from"./useAuthUser-pYpsu7_j.js";import{u as D}from"./MarketingLayout-DgmP9TJq.js";import{e as H,p as P,T as W}from"./toolJobs-Snk6_VYv.js";const d=I("broken-link-checker");function F(){const[n,u]=a.useState(""),[r,p]=a.useState(!1),[x,h]=a.useState(null),[g,k]=a.useState(null),[s,f]=a.useState(null),[T,b]=a.useState(!1),m=a.useRef(!1),{data:y}=B(),{isDarkMode:w}=D();a.useEffect(()=>()=>{m.current=!0},[]);const j=async()=>{if(!(!n.trim()||r)){p(!0),k(null),f(null),b(!1),h("Queuing check…");try{const t=await H("check-broken-links",n.trim()),i=await P(t,v=>h(v.step||(v.status==="pending"?"Waiting for a worker…":"Checking links…")),()=>m.current);i.status==="completed"&&i.result?(f(i.result),N("tool_run",d.slug)):k(i.error||"The check could not be completed. Please try again.")}catch(t){if((t==null?void 0:t.message)==="cancelled")return;t instanceof W?(b(!0),N("tool_limit_hit",d.slug,{signedIn:!!y})):k(t instanceof Error?t.message:"Something went wrong. Check the URL and try again.")}finally{m.current||(p(!1),h(null))}}},o=w?"text-gray-400":"text-muted-foreground";return e.jsxs("div",{children:[e.jsx("label",{htmlFor:"blc-url",className:"mb-2 block text-sm font-medium",children:"Page URL"}),e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row",children:[e.jsx(L,{id:"blc-url",type:"url",inputMode:"url",placeholder:"https://example.com/page",value:n,onChange:t=>u(t.target.value),onKeyDown:t=>t.key==="Enter"&&j(),className:"flex-1"}),e.jsx(q,{onClick:j,disabled:r||!n.trim(),className:"gap-2 bg-accent text-accent-foreground hover:bg-accent/90",children:r?e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-4 w-4 animate-spin"})," Checking…"]}):"Check links"})]}),r&&x&&e.jsxs("p",{className:l("mt-3 text-sm",o),role:"status",children:[x," This can take a minute or two on link-heavy pages."]}),g&&e.jsx("p",{className:"mt-3 text-sm text-red-600",role:"alert",children:g}),T&&e.jsx(E,{tool:d,signedIn:!!y,isDarkMode:w}),s&&e.jsxs("div",{className:"mt-6 space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[e.jsx(c,{label:"Links checked",value:s.totals.checked}),e.jsx(c,{label:"OK",value:s.totals.ok,tone:"good"}),e.jsx(c,{label:"Redirects",value:s.totals.redirects}),e.jsx(c,{label:"Broken",value:s.totals.broken,tone:s.totals.broken>0?"bad":"good"})]}),s.truncated&&e.jsxs("p",{className:l("text-xs",o),children:["This page has ",s.totals.found," unique links; the first 100 were checked."]}),s.totals.skipped>0&&e.jsxs("p",{className:l("text-xs",o),children:[s.totals.skipped," link",s.totals.skipped===1?"":"s"," pointing at private or internal addresses ",s.totals.skipped===1?"was":"were"," not checked."]}),s.brokenLinks.length===0?e.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-emerald-200 bg-emerald-50 p-4 text-sm text-emerald-800",children:[e.jsx(S,{className:"h-4 w-4 shrink-0"}),"No broken links found among the ",s.totals.checked," links checked."]}):e.jsxs("div",{children:[e.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[e.jsx(U,{className:"h-4 w-4 text-red-600"})," Broken links (",s.brokenLinks.length,")"]}),e.jsx("div",{className:"overflow-x-auto rounded-lg border",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:l("border-b text-xs uppercase tracking-wide",o),children:[e.jsx("th",{className:"px-3 py-2 font-medium",children:"Status"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"Anchor text"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"URL"})]})}),e.jsx("tbody",{children:s.brokenLinks.map(t=>e.jsxs("tr",{className:"border-b last:border-b-0 align-top",children:[e.jsxs("td",{className:"whitespace-nowrap px-3 py-2 font-mono text-xs text-red-600",children:[t.status??"—"," ",t.statusText]}),e.jsx("td",{className:"max-w-[16rem] px-3 py-2",children:t.anchorText||e.jsx("span",{className:o,children:"(no text)"})}),e.jsx("td",{className:"max-w-[24rem] break-all px-3 py-2 font-mono text-xs",children:t.url})]},t.url))})]})})]})]})]})}function c({label:n,value:u,tone:r}){return e.jsxs("div",{className:"rounded-lg border p-3",children:[e.jsx("div",{className:l("text-2xl font-bold tabular-nums",r==="good"?"text-emerald-600":r==="bad"?"text-red-600":void 0),children:u}),e.jsx("div",{className:"text-xs text-muted-foreground",children:n})]})}function Q(){return e.jsx(C,{tool:d,intro:"Paste any URL and we crawl that page for dead links: every anchor is extracted, checked live, and anything returning an error, timing out, or failing DNS is reported with its status code and anchor text. Free, no sign-up.",stats:[{value:"100",label:"Links checked per run"},{value:"5",label:"Links checked in parallel"},{value:"8s",label:"Timeout per link before it's flagged"},{value:"$0",label:"Cost — no sign-up"}],how:[{title:"Paste your URL",body:"Drop in any live page. We fetch its HTML and extract the links in the source, resolving relative URLs automatically. Links added by JavaScript after load aren't seen."},{title:"We check each link",body:"Up to 100 unique links are requested live. The check runs in the background; results usually land within a minute or two."},{title:"Fix what's broken",body:"You get every broken link with its status code and the anch
1or text it hides behind, so you can find it on the page fast."}],why:[{title:"Broken links leak ranking signal",body:"Internal links pass authority between your pages. Every link that dead-ends at a 404 throws that signal away instead of passing it on."},{title:"They waste crawl budget",body:"Crawlers that keep hitting dead URLs spend fewer requests on the pages you actually want indexed, and repeated errors erode crawl trust."},{title:"They cost conversions, not just rankings",body:"A visitor who clicks a dead link often leaves. Broken links on money pages are silent revenue leaks that nothing else surfaces."},{title:"External links rot constantly",body:"Pages you linked to years ago get moved or deleted without notice. Regular checks catch link rot before users and crawlers do."}],faq:[{q:"Is this broken link checker really free?",a:"Yes. It's free to use with no sign-up. Paste a URL and get your report."},{q:"How many links does it check?",a:"It checks up to 100 unique links per page, requesting them 5 at a time with an 8-second timeout each. If a page has more than 100 unique links, the first 100 found in the HTML are checked and the report says so."},{q:"What counts as a broken link?",a:"Any link that returns a 4xx or 5xx status code (like 404 Not Found or 500 Server Error), fails DNS lookup, or times out. Redirects (3xx) are counted separately and are not treated as broken."},{q:"Does it check images and scripts too?",a:"No. This tool checks anchor links (the a href elements on the page), which are what pass ranking signal and what visitors click. Image and script URLs are not requested."},{q:"Does it find links added by JavaScript?",a:"No. We read the page's HTML source, so links your framework injects client-side after load aren't included. For a fully client-rendered app, check the rendered pages individually."},{q:"Why does a link that works in my browser show as broken?",a:"Some sites block automated requests or rate-limit unknown clients, so they may answer our check with a 403 or 429 even though the page loads for you. Treat those as worth a manual look rather than definitely dead."}],children:e.jsx(F,{})})}export{Q as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.