HTTP Health Checks Before a Release
Check a public health URL’s status, timing, and redirect behavior from CI
A deployment can return a login redirect or an origin error while a superficial connectivity check still succeeds. Use a targeted HTTP check against the public URL your release process actually depends on, then compare the observed response with your own acceptance criteria.
Implementation example by the EdgeDNS team · Updated
An API Success Is Not an Origin Health Result
The EdgeDNS request can succeed while the destination returns an HTTP error. Following redirects can also hide an unexpected login or maintenance page behind a final 200. A HEAD response checks headers and status without proving that a GET body or an authenticated application workflow works.
Define the Expected Status Before Running the Check
Call the Free HTTP Check endpoint with an explicit public HTTP or HTTPS URL, including the health path when relevant. Set follow_redirects=false when a direct response is required, and choose a bounded timeout. Inspect data.status.code, data.error, data.final_url, and data.timings rather than the EdgeDNS HTTP status alone. The example first uses HEAD and retries once with GET only for origin 405 or 501 responses, which can indicate that HEAD is unsupported. It requires an expected 200; change that policy if your health contract uses another status such as 204. GET checks retrieve the response but do not return its application body for semantic assertions. These probes do not attach your application’s private credentials, so they cannot validate a protected health route or a logged-in journey. Use your CI system or scheduler to run this stateless check, and retain timestamps and results with the release. This is a single observation, not a continuous uptime guarantee or a geographic performance measurement. Pair it with the CI/CD security workflow when the release also needs security-policy checks.
Endpoints Used
Combine these EdgeDNS endpoints to build this solution.
/v1/network/http-checkAPI referenceHTTP Check: Inspect the observed origin status, redirect behavior, response timing, and HTTP headers for a public URL.
What this workflow helps you do
Check the intended path
Point the probe at the public health or readiness URL used by your release policy.
Reject unexpected redirects
Require the origin status your contract specifies rather than accepting a login page reached through a redirect.
Keep release evidence
Store the result and checked_at timestamp in CI artifacts; use a separate application test for body semantics and authentication.
Code Example
Require the configured origin status, with a bounded HEAD-to-GET fallback
// Run on your server or CI runner. Free access supports this endpoint.
const target = 'https://example.com/'; // Replace with your public health URL.
const expectedStatus = 200;
const headers = { Authorization: 'Bearer YOUR_API_KEY' };
async function check(method) {
const url = new URL('/v1/network/http-check', 'https://api.edgedns.dev');
url.search = new URLSearchParams({
url: target, method, follow_redirects: 'false', timeout: '10000'
}).toString();
const response = await fetch(url, { headers });
const result = await response.json();
if (!response.ok) throw new Error(result.error?.message ?? 'Diagnostic failed');
return result.data;
}
let report = await check('HEAD');
if ([405, 501].includes(report.status?.code)) report = await check('GET');
console.log('Release HTTP observation', report);
if (report.error || report.status?.code !== expectedStatus) {
throw new Error('Origin response does not meet the release policy');
}
// This checks status and transport, not application response-body semantics.Learn More
Explore industry standards and best practices related to this use case.
Ready to build HTTP Health Checks Before a Release?
Get started with 200 free API requests per month. No credit card required.
Other Use Cases
Subdomain Takeover Checks for Service Offboarding
Review dangling DNS before retiring a cloud resource or SaaS service
Product Engineer / International Growth TeamIP Geolocation for Content Localization
Suggest a regional experience while keeping the visitor in control
Email Marketing / DevOpsEmail Deliverability Monitoring
Check published sender authentication before a campaign