HTTP & Webhooksintermediate

What is Follow Redirects?

Whether the HTTP client automatically follows 3xx redirect responses to the new URL.

Definition

Follow redirects is a client-side setting that determines whether HTTP redirect responses (301 Moved Permanently, 302 Found, 307 Temporary Redirect) are automatically followed to the new URL. When enabled, a 301 redirect from /old-path to /new-path is seamlessly handled. When disabled, the client returns the redirect response itself, which your cron service may treat as a non-success response.

๐Ÿ’ก

Simple Analogy

Like a postal forwarding address โ€” when enabled, mail sent to the old address is automatically delivered to the new one. When disabled, the mail is returned to sender with a "moved" notice.

Why It Matters

If your endpoint URL changes and a redirect is in place, CronJobPro needs to follow that redirect to reach the actual endpoint. Without follow-redirects enabled, the job gets a 301/302 response, which may be treated as a failure. Conversely, blindly following redirects can lead to unexpected destinations, including malicious sites.

How to Verify

Check CronJobPro's redirect settings for your job. Test your endpoint with curl: `curl -L https://your-endpoint.com` (follows redirects) vs `curl https://your-endpoint.com` (does not). If your endpoint returns a 3xx code, verify the redirect target is correct.

โš ๏ธ

Common Mistakes

Not enabling redirects when the endpoint uses them (HTTP to HTTPS redirect is very common). Enabling unlimited redirects, allowing infinite redirect loops. Not updating the job's URL after a permanent redirect, relying on the redirect indefinitely.

โœ…

Best Practices

Enable follow-redirects with a maximum of 5 hops to prevent loops. After encountering a 301 permanent redirect, update the job's URL to the new location. Monitor for redirects in execution logs โ€” they add latency and indicate the configured URL is outdated.

HTTP Methods Guide

Learn about HTTP methods

Try it free โ†’

Frequently Asked Questions

What is Follow Redirects?

Follow redirects is a client-side setting that determines whether HTTP redirect responses (301 Moved Permanently, 302 Found, 307 Temporary Redirect) are automatically followed to the new URL. When enabled, a 301 redirect from /old-path to /new-path is seamlessly handled. When disabled, the client returns the redirect response itself, which your cron service may treat as a non-success response.

Why does Follow Redirects matter for cron jobs?

If your endpoint URL changes and a redirect is in place, CronJobPro needs to follow that redirect to reach the actual endpoint. Without follow-redirects enabled, the job gets a 301/302 response, which may be treated as a failure. Conversely, blindly following redirects can lead to unexpected destinations, including malicious sites.

What are best practices for Follow Redirects?

Enable follow-redirects with a maximum of 5 hops to prevent loops. After encountering a 301 permanent redirect, update the job's URL to the new location. Monitor for redirects in execution logs โ€” they add latency and indicate the configured URL is outdated.

Related Terms