Stay organized with collections
Save and categorize content based on your preferences.
This page shows you how to resolve issues with origins
when you configure them to work with Media CDN.
Troubleshoot origin connectivity
If you are receiving HTTP 50x errors, such as HTTP 502 (Gateway Timeout) or HTTP
500 (Internal Server Error), consider the following:
Test that the origin hostname can be resolved with Google Public
DNS, and that the resolved IP addresses matches
expectations. If you recently changed your DNS records, resolvers might
still have the old address in their caches.
If your origin only supports HTTP/1.1 and does not support HTTP/2,
configure the protocol field on the origin to use HTTP or HTTPS
instead of HTTP2. Media CDN does not fall back to HTTP/1.1
connections unless specified.
Check that origin has a valid (publicly trusted) and unexpired SSL (TLS)
certificate.
HTTP/2 Trailers are not supported, and requests to an origin
server don't include the "TE" request header. Trailers included in a
response are not cached or returned to the client.
Troubleshooting origin failover
If an origin failover isn't behaving as expected, consider the following:
Ensure that the appropriate host header rewrite is configured on your
failover origin.
Ensure that your primary origin is configured with sufficient
maxAttemptsTimeout, maxAttempts, and timeouts to accommodate origin
redirects and failovers. Origin redirects count as separate connection
attempts against the maxAttempts setting.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Troubleshoot origins\n\nThis page shows you how to resolve issues with [origins](/media-cdn/docs/origins)\nwhen you configure them to work with Media CDN.\n\nTroubleshoot origin connectivity\n--------------------------------\n\nIf you are receiving HTTP 50x errors, such as HTTP 502 (Gateway Timeout) or HTTP\n500 (Internal Server Error), consider the following:\n\n- Test that the origin hostname can be resolved with [Google Public\n DNS](http://dns.google.com/), and that the resolved IP addresses matches\n expectations. If you recently changed your DNS records, resolvers might\n still have the old address in their caches.\n\n- If your origin *only* supports HTTP/1.1 and does not support HTTP/2,\n configure the `protocol` field on the origin to use `HTTP` or `HTTPS`\n instead of `HTTP2`. Media CDN does not fall back to HTTP/1.1\n connections unless specified.\n\n- Check that [request logs in Cloud Logging](/media-cdn/docs/logging)\n contain the correct origin IP address.\n\n- Check that origin has a valid (publicly trusted) and unexpired SSL (TLS)\n certificate.\n\n- HTTP/2 Trailers are not supported, and requests to an origin\n server don't include the \"TE\" request header. Trailers included in a\n response are not cached or returned to the client.\n\nTroubleshooting origin failover\n-------------------------------\n\nIf an origin failover isn't behaving as expected, consider the following:\n\n- Ensure that the appropriate host header rewrite is configured on your\n failover origin.\n\n- Ensure that your primary origin is configured with sufficient\n `maxAttemptsTimeout`, `maxAttempts`, and `timeouts` to accommodate origin\n redirects and failovers. Origin redirects count as separate connection\n attempts against the `maxAttempts` setting.\n\nWhat's next\n-----------\n\n- Read about [origin connectivity and shielding](/media-cdn/docs/origins)"]]