Itheum Docs
  • 👋Getting Started
  • Infrastructure
    • 🚆AI Data Workforce
      • Token Utility for the AI Data Workforce
      • Join the Workforce
      • Liveliness Staking Rewards
    • 🖼️Data NFT
      • Data NFT Types
        • Data NFT-FT
        • Data NFT-LEASE
        • Data NFT-PH (Plug-In Hybrid)
      • Data NFT Generative Image Tool
    • 🤖NFMe ID Vaults
    • 🔋Liveliness - On-Chain Reputation
      • Data Creator Liveliness Bonding
        • Liveliness Score States
      • Liveliness Staking
      • FAQ - Liveliness staking
    • 🔓Data Marshal Network
  • Apps
    • 🔥<BiTz> XP System
      • Bonus BiTz for protocol usage
    • 💹Data NFT Marketplace
      • Listing a Data NFT
      • Procuring a Data NFT
      • FAQ - Data NFT Marketplace
    • 📡Data DEX
      • Minting a Data NFT
        • Store Data and Mint a Data NFT - Step-by-Step Tutorial
        • Creator Donations For Community Airdrops
      • Using the claims Portal
      • CanaryNet Guardrails
        • Guardrail : Trading Data NFTs on 3rd Party NFT Marketplaces
    • 🔍Itheum Explorer
  • Integrators
    • 🔋Liveliness Staking Guides
      • Liveliness Staking Guide : Solana
      • Liveliness Staking Guide : MultiversX
    • 📙Data Streams Guides
      • Data Asset Storage Options
      • Data Stream URL Rules
      • Zedge Storage
        • Static File on IPFS
        • Dymamic File on IPFS + DNS Link
        • Dymamic File on IPFS + IPNS
        • Music Data NFT Compatible Dynamic Data Stream on IPFS + IPNS
        • Trailblazer Data NFT Compatible Dynamic Data Stream on IPFS + IPNS
      • Amazon Web Services (AWS)
        • Storage : AWS S3
          • Data NFT Streaming Automation - Multiple files
          • Manual upload of file to AWS for Data NFT Streaming
          • Data NFT Streaming Automation - Trailblazer
        • Hosting : AWS S3 + Cloudflare
          • Task 1: Use a domain name to "sit in front" of your AWS S3 Bucket Public URL
          • Task 2: Convert your AWS S3 Bucket into a "website"
          • Task 3: Use Cloudflare to connect your Domain Name to your S3 Bucket securely
          • Troubleshooting
      • Akord - Arweave blockchain
      • MultiversX Native Auth Protected API
    • 📗Data DEX Guides
      • MultiversX Blockchain
        • Guide 1 : Get Started with the Data DEX on MultiversX
          • Section 1: Setting up wallets on the MultiversX Blockchain - Devnet
          • Section 2: Getting xEGLD Gas tokens to pay for transactions - MultiversX Devnet
          • Section 3: Getting ITHEUM devnet tokens via the Data DEX - MultiversX Devnet
        • Guide 2: Get Started with Itheum Enterprise
        • Itheum Ecosystem Actions Catalogue
      • Astar Network
        • Guide 1 : Get Started with the Data DEX on Astar Network
          • Section 1: Setting up wallets on Astar Network - Shibuya Testnet
          • Section 2: Getting ITHEUM devnet tokens via the Data DEX - Shibuya Testnet
        • Guide 2 : Procure Data NFTs from the peer-to-peer Data NFT Marketplace on Astar Network
        • Guide 3: Use the “Web3 Gamer Passport” App on the Astar Network to trade your PlayStation Data
    • 💳Supported Wallets
      • MultiversX DeFi Wallet
      • Ledger Wallet
      • xPortal Wallet
      • xAlias (Login with Google)
    • 📕Trailblazer Guides
      • How to Acquire a Trailblazer
      • How to view a Trailblazer
      • How to List a Trailblazer
    • 📘Data Coalition DAOs (DC DAOs) Guides
      • Appointer > Delegator Pattern for Data NFT "Deputizing"
  • Developers
    • 👨‍💻Software Development Kits (SDKs)
      • Data NFT SDK
        • Guide 1 : Minting a Custom Data NFT Collection with Authenticated Data Streams (via SDK)
        • Guide 2 : Unlocking Data NFTs via MultiversX Native Auth
        • Guide 3 : Using Nested Streams to Access Nested Data Assets from a Primary Data Stream
        • Guide 4: Use the Data NFT "Deputy" Feature to delegate access of your Data NFTs to a Smart Contract
        • Guide 5: Preparing a Data Stream containing a password to protect a URL
      • Enterprise SDK
        • Guide 1 : Using Itheum Enterprise to Mint a Data NFT Collection (e.g. NFT Loyalty Card Solution)
      • Data Marshal Network SDK
        • Guide 1 : Make your Regular NFT Collection to be Data NFT-PH Compatible
    • 🥋Data Marshal Network
      • Data Marshal Node Gateway Endpoints
      • Data Marshal Transit Flags and Headers
    • 🛂Tech Support - Discord
      • Portal Bridge Support
    • 🛒Release Notes
      • Data DEX
      • Itheum Explorer
      • Data NFT SDK
      • Enterprise SDK
      • Data Marshal Network
    • 🔐Security
      • 🐞Bug Bounty
      • ℹ️Security Audit
  • Protocol
    • $ITHEUM Token
    • 🌉Token Bridge
      • FAQ - Omni-Chain Portal Bridge
      • $ITHEUM Token Multi-Chain Max Supply Rebalancing Transactions Audit
    • 🏆Token Rewards
      • Badges
    • 🧨Token Burning
      • Phase 1 : Token Burn Program
    • 🏛️Governance
      • Itheum Ecosystem DAO
        • Version 1: How it Works
      • Itheum xPand DAO
        • Itheum xPand Grants Program
          • Code Of Conduct
          • Announcement Guidelines
          • Cohorts vs Alpha Builders
        • Program 1: MultiversX Post-Hackathon Accelerator
        • Program 2: xPand DAO Music Data NFT Growth
    • 💪Hackathons and Dev Challenges
      • MultiversX xDay Hackathon
        • Project Ideas > MultiversX Dev Tooling and Infra
        • Project Ideas > Itheum
        • Test Data NFT Catalog
      • Community Test Events
        • Portal Traveler 🌀 : Test the Itheum Omni-Chain Portal (Bridge)
        • APR for Liveliness 🎖️: Test the Bonding + Staking Rewards Module
        • Minting and Bonding on Solana
  • R&D
    • 🏢Itheum Enterprise
    • 🗳️Data Coalition DAOs (DC DAOs)
    • 🎏Trailblazer
      • FAQ - Trailblazer
  • Legal
    • ⚖️Ecosystem Tools Terms
      • Datadex
        • Terms Of Use
        • Privacy Policy
      • Liveliness Bonding: Penalties and Slashing Terms
      • BiTz XP
        • Give BiTz
      • Omni-Chain Portal Bridge
      • Gamer Passport
        • Data Collection and Storage
    • 👮Content Guidelines
    • Itheum Data License
    • Terminology Disclaimer
    • Protocol Docs, Token Disclaimer
Powered by GitBook
On this page
  • Step 1: Find the AWS S3 Website URLs for your bucket and data assets
  • Step 2: Sign up for a free Cloudflare account
  • Step 3: Import your Domain's DNS settings into Cloudflare
  • Step 4: Add a new CNAME record to complete the connection of your domain name with S3
  • Step 5: Disable cache on Cloudflare
  1. Integrators
  2. Data Streams Guides
  3. Amazon Web Services (AWS)
  4. Hosting : AWS S3 + Cloudflare

Task 3: Use Cloudflare to connect your Domain Name to your S3 Bucket securely

PreviousTask 2: Convert your AWS S3 Bucket into a "website"NextTroubleshooting

Last updated 1 year ago

In task 2, we created a "static website hosting" friendly AWS S3 bucket to host our data assets and uploaded our data assets into this bucket like so:

Step 1: Find the AWS S3 Website URLs for your bucket and data assets

These data assets are now publicly available via internal "AWS S3 website URLs," and we need to know these URLs to continue with the steps.

To find the "AWS S3 website URLs" on your AWS S3 bucket, navigate to the "Properties" tab of your bucket and down to the “Static website hosting,” and you will see the following "Bucket website endpoint."

Click on this link, and it should open a new tab with this URL and the following error message.

This error means it could not find a default "index.html" file, as we may not have uploaded it (as we don't need it for our Data Stream). But, if you append the paths (folder + file name) of the files we uploaded in the S3 bucket, we can view these files publicly. Let's do that now; in our example, the files paths would be like so:

  • http://dataassets.alice-datanft-bucket.com.s3-website-ap-southeast-2.amazonaws.com/file_storage/stream_1.json

  • http://dataassets.alice-datanft-bucket.com.s3-website-ap-southeast-2.amazonaws.com/file_storage/stream_2.svg

And when you open these links, you should see both your JSON and SVG files.

So we now have public URLs for our files, but these URLs are not secure (they don't support https://), and they are not hosted behind our new domain name. Let's use Cloudflare to get this done and complete our process.

Step 2: Sign up for a free Cloudflare account

Enter the new "Domain Name" you procured as part of Task 1: Use a domain name to "sit in front" of your AWS S3 Bucket Public URL

Select the "Free Plan" and click on Continue.

Step 3: Import your Domain's DNS settings into Cloudflare

Cloudflare will then begin importing your Domain Name's DNS records (the configuration settings for your domain name) into Cloudflare's system. You will see a similar (not the same) screen if it can detect your domain via your registrar. Click on Continue.

In the next step, Cloudflare will ask you to change the "nameservers" in your domain registrar (e.g., namecheap, GoDaddy, etc.). This is the action that moves the DNS records over to Cloudflare.

Important: ONLY do this step if your domain name is new. There may be unintended consequences if you do this with a domain name already hosting some websites. This guide is for people using a new domain name to mint Data NFTs.

Once you update the nameservers, it may take time for Cloudflare to complete the DNS import, and when it's a success, you will see a similar message on the Cloudflare dashboard.

Step 4: Add a new CNAME record to complete the connection of your domain name with S3

In step 1 above, we discovered that the "Bucket website endpoint" for our S3 bucket was

dataassets.alice-datanft-bucket.com.s3-website-ap-southeast-2.amazonaws.com

This was in our example, your "Bucket website endpoint" will of course be different.

And we had a full url to our Data Stream link so:

http://dataassets.alice-datanft-bucket.com.s3-website-ap-southeast-2.amazonaws.com/file_storage/stream_1.json In Task 1: Use a domain name to "sit in front" of your AWS S3 Bucket Public URL we obtained the domain name https://alice-datanft-bucket.com

In Step 1: Find the AWS S3 Website URLs for your bucket and data assets we decided that we intend to host our data assets in a subdomain https://dataassets.alice-datanft-bucket.com

So that our current Data Stream link:

http://dataassets.alice-datanft-bucket.com.s3-website-ap-southeast-2.amazonaws.com/file_storage/stream_1.svg Can become:

https://dataassets.alice-datanft-bucket.com/file_storage/stream_2.svg

This can be achieved by setting up a new CNAME record in Cloudflare's DNS that point the "dataassets" subdomain to the S3 bucket's website endpoint host.

Record Type: CNAME
Name: dataassets (the subdomain of your main domain)
Target: dataassets.alice-datanft-bucket.com.s3-website-ap-southeast-2.amazonaws.com (only the host name of your "Bucket website endpoint")
TTL: Auto (or similar)

Click on "Add Record" and create a new CNAME with the relevant details and click on "Save"

Once this has been done, it may take some time for the CNAME to apply. But once it's done, you should be able to view your new AWS S3-based data stream link behind your domain name. e.g., https://dataassets.alice-datanft-bucket.com/file_storage/stream_2.svg

Step 5: Disable cache on Cloudflare

As we will use automated scripts to keep the data assets updated on AWS S3, and now that we have Cloudflare sitting in front of our S3 bucket, there is some possibility that our S3 data assets get heavily cached by Cloudflare as it is also a Content Distribution Network (CDN) and caches content to speed up content delivery. Unfortunately, this caching behavior is not good for users trying to unlock Data NFTs to view data in a timely manner. Therefore, it is advisable to "disable" caching on Cloudfront.

We don't need to turn off ALL cache; we only need to create some Cloudfront Cache Rules to disable the specific folders (or paths) we have set up in AWS S3 that hosts our data assets for the Data Stream.

In yr Cloudflare dashboard, click on your Site and then to "Caching" and then to "Cache Rules". Create a new Cache Rule. As our data assets are stored in the "/file_storage" path (and S3 Bucket) we disable caching for this, like the image below. Click on "Save" and wait a few minutes for this rule to take effect.


Cloudflare is a leading content and security platform that provides many features, and best of all, its free version is all we need. When writing this guide, there was also no requirement for a credit card to sign up. Head over to and sign up for a new account with you email. Once you signup, you will be taken to the dashboard, and you should see a "Get Started" button somewhere on the screen like this.

Congratulations! And with this, you should have a fully robust, secure, flexible, and production grand Data NFT Data Stream up and running. If you need any help with this guide, please get in touch with us on

📙
https://www.cloudflare.com/
Discord's technical support channel
Copy the Cloudflare nameservers from here
In this example, the domain name is with Namecheap and we copy Cloudflare's name servers to here