sam17
April 27, 2020, 3:46pm
1
Our site is currently using a CNAME setup and we’d like to use Cloudflare services on a subdomain, like: cloudflare.ourdomain.com and forward all traffic going to our root ourdomain.com to the cloudflare.ourdomain.com proxied to Cloudflare.
We want to avoid using a 301 redirect and have the traffic to only ever see our root domain in the address bar .
is the above possible using htaccess?
what other steps do we need to consider? Assuming we will need to provision the Cloudflare Universal SSL as well per https://support.cloudflare.com/hc/en-us/articles/360020615111-Configuring-a-CNAME-setup
Thanks for your help!
That’s more like domain masking, which Cloudflare doesn’t offer as a feature. But you can use Workers to do this within your own domain. This script should get you headed in that direction:
serve_s3_images_from_own_domain.js
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
* When we receive a request, fetch it from our S3 bucket
*
* For example, a request for:
* https://mydomain.com/images/castle01.jpg
* will be fetched from:
This file has been truncated. show original
system
Closed
May 28, 2020, 9:46pm
3
This topic was automatically closed after 31 days. New replies are no longer allowed.