<p>I have a website that is developed by WordPress. Recently I try to activate Google CDN for this website. My host provider is not google. After installing CDN it takes almost 3 hours to activate SSL. I replaced the IP that I created in A record of the website. I get this error :</p>
<pre><code>ERR_TOO_MANY_REDIRECT
</code></pre>
<p>I disabled all plugins and rename .htaccess. But I read an article in TargetTrend website which was published one years ago that says:</p>
<blockquote>
<p>If you are not hosting your site with Google Cloud Platform (GCP), you
will be unable to use Google Cloud CDN. This is because Google Cloud
CDN only works with Google load balancer and cloud storage origin.</p>
</blockquote>
<p>Do you try to use Google CDN for your WordPress website which is not hosted by google cloud?</p>
<p><strong>UPDATED: Adding the process I followed.</strong></p>
<p>To make my question more clear I follow these steps:</p>
<ol>
<li><p>I did not have google cloud account, so I signed up.</p>
</li>
<li><p>Network services &gt;&gt; Cloud CDN - In this they ask me to enable cloud engine and I enable that, later
again I return to : <em>Network services &gt;&gt; Cloud CDN</em></p>
</li>
<li><p>I click on <em>Add Origin</em>.</p>
</li>
<li><p>I set a name, and I choose <em>customer origin</em>, as <em>IP
address/Domain Name</em> I type example.nl and <em>Port</em> 80</p>
</li>
<li><p>I click on <em>Create new load balancer for me</em>  and type
<em>my-nl-website</em></p>
</li>
<li><p>under <em>Custom request headers</em> , I clicked on Add header, <em>Host</em>
as  <em>header name</em>, and <em>example.nl</em> as <em>header value 1</em> and click on    <em>DONE</em></p>
</li>
<li><p>I went to Network service &gt;&gt; Load Balancer, here I clicked on the
<em>my-nl-website</em> , there was an IP, I copy this IP and add an extra A record  for this IP</p>
</li>
<li><p>Later  I get error on <code>this website is not secure</code> and I edited the load balancer, I creat a new IP and clicked on google certificate, and wait until SSL created.</p>
</li>
<li><p>Now instead of getting the website is not secure, I get <em>redirect to many times.</em></p>
</li>
<li><p>Currently based on what I read in the Document, I try to create a <em>load balancer</em> and <em>network endpoint group</em> manually and then try <em>cloud CDN</em>.  I hope this manual creation solves my problem.</p>
</li>
</ol>

Sallar Rabiei
<p>Yes, you can use the Cloud CDN with <strong>external</strong> original also.</p>
<p>we were running it before and moved WordPress to GKE for redirect SSL error try adding snippet into <code>config.php</code> once, plus make sure inside database <code>wp_option or wp_setting</code> table have site URL are using <strong>HTTPS</strong> not <strong>HTTP</strong></p>
<pre><code>if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &amp;&amp; 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
    $_SERVER['HTTPS'] = 'on';
}
</code></pre>
<p>in cloud CDN you have options for <code>backend service</code>, <code>cloud bucket</code> and <code>custom origin</code> also.</p>
<p><a href="https://i.stack.imgur.com/vdrtP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vdrtP.png" alt="enter image description here" /></a></p>
<p>Ref document : <a href="https://cloud.google.com/cdn/docs/setting-up-cdn-with-ex-backend-internet-neg" rel="nofollow noreferrer">https://cloud.google.com/cdn/docs/setting-up-cdn-with-ex-backend-internet-neg</a></p>
