Block access to subdomain

what I want I will try to explain better I have a video site that uses an s3 to store the videos I also use a subdomain to access these mp4 video files example https://cdn1.example.net/2023/03/example. mp4 which is Cloudflare what I want is that if this domain is used on another site that is not example.net it does not work giving an error I have already tried using the referer but it blocks the entire main site

If the referrer trick doesn’t work well enough, an alternative could then be by using presigned URL’s with S3.

→ Using presigned URLs - Amazon Simple Storage Service

Literally here, you would be generating temporary URL’s that are only valid for a certain amount of time.

Your website (or wherever you need the videos to be accessed form) would most likely require to be re-programmed in order to take advantage of that kind of thing.

With S3 being Amazon S3, you would most likely have an Unproxied (:grey:) record of the type CNAME pointing to the Amazon S3 bucket.

In that kind of situation, the traffic would NOT be crossing over Cloudflare, and Cloudflare wouldn’t be able to do anything to restrict the traffic.

1 Like

yes i use Cloudflare my s3 is the contabo and i use cdn Cloudflare i tried to use the firewall to allow access to the subdomain only from the main domain but when i activated it blocked access to the whole site, maybe i did it wrong

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.