Replies: 3 comments 5 replies
-
I discourage the use of CloudFlare with Surge. CloudFlare must check a surge endpoint prior to serving each request which is guaranteed to be slower than using Surge directly. Upgrading to Surge Professional gets you auto-magic cert provisioning/renewal and the CLI has commands for checking and provisioning certs. See #446 for more information about Cert Management on surge. |
Beta Was this translation helpful? Give feedback.
-
How to make sure that domain goes through Cloudflare Refer to the HTTP header with cURL etc .:
You may see
If you can also see See You can also check the WHOIS name server. However, it is not a reliable survey method because you can register for Cloudflare's site on a subdomain if you are using a paid plan. In some cases, Cloudflare is used for DNS-only purposes. (DNS alone is unlimited, so it has an advantage over other name server services) |
Beta Was this translation helpful? Give feedback.
-
You will get a warning if you dont have SSL. Surge wants me to pay for basic website security. |
Beta Was this translation helpful? Give feedback.
-
If you want to use Surge further, Surge Professional is a good choice:
https://surge.sh/pricing
But you might consider using Cloudflare:
Surge can reduce bandwidth. It will give you a little more stable operation, which is also beneficial on the Surge side.
When you go through Cloudflare with each web service, you often run into problems, so we recommend that you do not go through it on the web service side. Surge may also have it. This is a collection of tips for that.
Note: Cloudflare items are many and complex. If you make the wrong settings, your web may not be visible to us at all!
The Cache-Control specified by Surge always references the Surge CDN, even via Cloudflare:
https://surge.sh/help/using-lucid-caching-automatically
https://support.cloudflare.com/hc/en-us/articles/115003206852-Understanding-Origin-Cache-Control
Still, thanks to the Surge CDN, the response is pleasing in many areas.
If your region is far from the Surge CDN, you may want to benefit from the Cloudlfare CDN's edge server.
You can do this with Page Rules on the Cloudflare side!:
Cloudflare also doesn't cache
.html
orsitemap.xml
by default.It's always getting the latest files from the Surge CDN by updating your files.
That's ideal, but if you still want to cache
.html
andsitemap.xml
:Note: After you do this and after updating the file, you will need
Purge Cache
on the Cloudflare side.If you want to apply SSL (TLS) , You can select Full for
our SSL/TLS encryption mode
.Full (strict)
cannot be selected, but it can be substituted. (Ideal than Flexible)The Surge server usually has a certificate for
* .surge.sh
, Cloudflare can use it.Are you using Surge Professional? In that case, you can use Cloudflare Origin CA certificates.
Surge Professional can apply Custom SSL certificate
This allows you to select
Full (strict)
inour SSL / TLS encryption mode
. It's an even better option.Beta Was this translation helpful? Give feedback.
All reactions